@codingame/monaco-vscode-css-language-features-default-extension 26.2.1 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
(()=>{var e={107:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.InlayHint{data;constructor(e,t,n){super(e,t,n)}}t.default=c},190:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const a=n(1398),c=n(3434),u=s(n(8820)),l=n(9810);var d;!function(e){e.fromConfiguration=function(e){const t=a.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(d||(d={}));class h extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,l.ensure)((0,l.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:u.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,d.fromConfiguration(e))};return i.sendRequest(c.DocumentFormattingRequest.type,o,n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTextEdits(e,n),e=>i.handleFailedRequest(c.DocumentFormattingRequest.type,n,e,null))},r=i.middleware;return r.provideDocumentFormattingEdits?r.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[a.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentFormattingFeature=h;class p extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){const t=(0,l.ensure)((0,l.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,d.fromConfiguration(e))};return o.sendRequest(c.DocumentRangeFormattingRequest.type,r,i).then(e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,i),e=>o.handleFailedRequest(c.DocumentRangeFormattingRequest.type,i,e,null))},s=o.middleware;return s.provideDocumentRangeFormattingEdits?s.provideDocumentRangeFormattingEdits(e,t,n,i,r):r(e,t,n,i)}};return e.rangesSupport&&(n.provideDocumentRangesFormattingEdits=(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:o.code2ProtocolConverter.asRanges(t),options:o.code2ProtocolConverter.asFormattingOptions(n,d.fromConfiguration(e))};return o.sendRequest(c.DocumentRangesFormattingRequest.type,r,i).then(e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,i),e=>o.handleFailedRequest(c.DocumentRangesFormattingRequest.type,i,e,null))},s=o.middleware;return s.provideDocumentRangesFormattingEdits?s.provideDocumentRangesFormattingEdits(e,t,n,i,r):r(e,t,n,i)}),[a.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentRangeFormattingFeature=p;class f extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,l.ensure)((0,l.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideOnTypeFormattingEdits:(e,t,n,i,o)=>{const r=this._client,s=(e,t,n,i,o)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t),ch:n,options:r.code2ProtocolConverter.asFormattingOptions(i,d.fromConfiguration(e))};return r.sendRequest(c.DocumentOnTypeFormattingRequest.type,s,o).then(e=>o.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,o),e=>r.handleFailedRequest(c.DocumentOnTypeFormattingRequest.type,o,e,null))},a=r.middleware;return a.provideOnTypeFormattingEdits?a.provideOnTypeFormattingEdits(e,t,n,i,o,s):s(e,t,n,i,o)}},i=e.moreTriggerCharacter||[];return[a.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...i),n]}}t.DocumentOnTypeFormattingFeature=f},276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[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,r=(e,t,n)=>i.sendRequest(o.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n),e=>i.handleFailedRequest(o.TypeDefinitionRequest.type,n,e,null)),s=i.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,r):r(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},378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const i=n(3434),o=n(5679);t.ProgressFeature=class{_client;activeParts;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 o.ProgressPart(this._client,e.token,t))})}clear(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.TypeHierarchyPrepareRequest.type,r,n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(e,n),e=>i.handleFailedRequest(o.TypeHierarchyPrepareRequest.type,n,e,null))};return r.prepareTypeHierarchy?r.prepareTypeHierarchy(e,t,n,s):s(e,t,n)}provideTypeHierarchySupertypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySupertypesRequest.type,i,t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t),e=>n.handleFailedRequest(o.TypeHierarchySupertypesRequest.type,t,e,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,r):r(e,t)}provideTypeHierarchySubtypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySubtypesRequest.type,i,t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t),e=>n.handleFailedRequest(o.TypeHierarchySubtypesRequest.type,t,e,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.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},571:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserMessageWriter=t.BrowserMessageReader=void 0,t.createMessageConnection=function(e,t,n,i){return void 0===n&&(n=s.NullLogger),s.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,s.createMessageConnection)(e,t,n,i)},r(n(1003)).default.install();const s=n(9765);o(n(9765),t);class a extends s.AbstractMessageReader{_onData;_messageListener;constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=a;class c extends s.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("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.BrowserMessageWriter=c},623:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const a=n(1398),c=n(3434),u=s(n(8820)),l=s(n(1027)),d=n(9810);class h extends d.TextDocumentLanguageFeature{constructor(e){super(e,c.RenameRequest.type)}fillClientCapabilities(e){const t=(0,d.ensure)((0,d.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=c.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(l.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:u.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t=e.documentSelector,n={provideRenameEdits:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(c.RenameRequest.type,r,i).then(e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asWorkspaceEdit(e,i),e=>o.handleFailedRequest(c.RenameRequest.type,i,e,null,!1))},s=o.middleware;return s.provideRenameEdits?s.provideRenameEdits(e,t,n,i,r):r(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(c.PrepareRenameRequest.type,o,n).then(e=>n.isCancellationRequested?null:c.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&&c.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.")})},r=i.middleware;return r.prepareRename?r.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&l.boolean(t.defaultBehavior)}}t.RenameFeature=h},632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=function(e){return e?("{}"===e.slice(0,2)&&(e="\\{\\}"+e.slice(2)),T(function(e){return e.replace(f,o).replace(g,r).replace(m,s).replace(v,a).replace(y,c)}(e),!0).map(_)):[]};const i=n(3337),o="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0",u=new RegExp(o,"g"),l=new RegExp(r,"g"),d=new RegExp(s,"g"),h=new RegExp(a,"g"),p=new RegExp(c,"g"),f=/\\\\/g,g=/\\{/g,m=/\\}/g,v=/\\,/g,y=/\\./g;function b(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function _(e){return e.replace(u,"\\").replace(l,"{").replace(d,"}").replace(h,",").replace(p,".")}function C(e){if(!e)return[""];const t=[],n=(0,i.balanced)("{","}",e);if(!n)return e.split(",");const{pre:o,body:r,post:s}=n,a=o.split(",");a[a.length-1]+="{"+r+"}";const c=C(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function D(e){return"{"+e+"}"}function w(e){return/^-?0\d/.test(e)}function S(e,t){return e<=t}function R(e,t){return e>=t}function T(e,t){const n=[],o=(0,i.balanced)("{","}",e);if(!o)return[e];const r=o.pre,a=o.post.length?T(o.post,!1):[""];if(/\$$/.test(o.pre))for(let e=0;e<a.length;e++){const t=r+"{"+o.body+"}"+a[e];n.push(t)}else{const i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),u=i||c,l=o.body.indexOf(",")>=0;if(!u&&!l)return o.post.match(/,(?!,).*\}/)?T(e=o.pre+"{"+o.body+s+o.post):[e];let d,h;if(u)d=o.body.split(/\.\./);else if(d=C(o.body),1===d.length&&void 0!==d[0]&&(d=T(d[0],!1).map(D),1===d.length))return a.map(e=>o.pre+d[0]+e);if(u&&void 0!==d[0]&&void 0!==d[1]){const e=b(d[0]),t=b(d[1]),n=Math.max(d[0].length,d[1].length);let i=3===d.length&&void 0!==d[2]?Math.abs(b(d[2])):1,o=S;t<e&&(i*=-1,o=R);const r=d.some(w);h=[];for(let s=e;o(s,t);s+=i){let e;if(c)e=String.fromCharCode(s),"\\"===e&&(e="");else if(e=String(s),r){const t=n-e.length;if(t>0){const n=new Array(t+1).join("0");e=s<0?"-"+n+e.slice(1):n+e}}h.push(e)}}else{h=[];for(let e=0;e<d.length;e++)h.push.apply(h,T(d[e],!1))}for(let e=0;e<h.length;e++)for(let i=0;i<a.length;i++){const o=r+h[e]+a[i];(!t||u||o)&&n.push(o)}}return n}},708:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentLinks(e,t),e=>n.handleFailedRequest(c.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,i=(e,t)=>n.sendRequest(c.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then(i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asDocumentLink(i),i=>n.handleFailedRequest(c.DocumentLinkResolveRequest.type,t,i,e)),o=n.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[a.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentLinkFeature=d},710:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.LanguageClient=t.BaseLanguageClient=t.ShutdownMode=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const a=n(1398),c=n(3434),u=s(n(4346)),l=s(n(3881)),d=s(n(1027)),h=n(5671),p=s(n(8820)),f=n(5679),g=n(9810),m=n(7034),v=n(4292),y=n(4267),b=n(9504),_=n(3507),C=n(4231),D=n(3876),w=n(4092),S=n(986),R=n(7984),T=n(3652),P=n(4384),O=n(276),k=n(7523),x=n(7327),M=n(2114),q=n(3760),F=n(190),j=n(623),E=n(708),N=n(2837),I=n(2855),L=n(7921),A=n(7086),H=n(8382),K=n(1423),W=n(2661),U=n(514),z=n(7511),$=n(6811),B=n(6272),V=n(4201),G=n(2758),J=n(5122),Q=n(6576),X=n(378);var Z,Y,ee,te,ne,ie,oe,re,se,ae;!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"}(Z||(t.RevealOutputChannelOn=Z={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(Y||(t.ErrorAction=Y={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(ee||(t.CloseAction=ee={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.StartFailed=4]="StartFailed",e[e.Running=2]="Running"}(te||(t.State=te={})),function(e){e.off="off",e.on="on"}(ne||(t.SuspendMode=ne={})),function(e){e.sanitizeIsTrusted=function(e){return null!=e&&!!("boolean"==typeof e||"object"==typeof e&&null!==e&&d.stringArray(e.enabledCommands))&&e}}(ie||(ie={}));class ce{client;maxRestartCount;restarts;constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:Y.Continue}:{action:Y.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:ee.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:ee.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:ee.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(oe||(oe={})),function(e){e.is=function(e){return e&&c.MessageReader.is(e.reader)&&c.MessageWriter.is(e.writer)}}(re||(t.MessageTransports=re={})),function(e){e.Restart="restart",e.Stop="stop"}(se||(t.ShutdownMode=se={}));class ue{open;_onOpen;_onClose;disposable;constructor(){this.open=new Set,this._onOpen=new a.EventEmitter,this._onClose=new a.EventEmitter,ue.fillTabResources(this.open);void 0!==a.window.tabGroups.onDidChangeTabs?this.disposable=a.window.tabGroups.onDidChangeTabs(e=>{if(0===e.closed.length&&0===e.opened.length)return;const t=this.open,n=new Set;ue.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(a.Uri.parse(t));this._onClose.fire(e)}if(o.size>0){const e=new Set;for(const t of o)e.add(a.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 a.Uri?a.window.activeTextEditor?.document.uri===e:a.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof a.Uri?e:e.uri;return t.scheme===v.NotebookDocumentSyncFeature.CellScheme?a.workspace.notebookDocuments.some(e=>!!this.open.has(e.uri.toString())&&void 0!==e.getCells().find(e=>e.document.uri.toString()===t.toString())):this.open.has(t.toString())}getTabResources(){const e=new Set;return ue.fillTabResources(new Set,e),e}static fillTabResources(e,t){const n=e??new Set;for(const e of a.window.tabGroups.all)for(const i of e.tabs){const e=i.input;let o;e instanceof a.TabInputText?o=e.uri:e instanceof a.TabInputTextDiff?o=e.modified:(e instanceof a.TabInputCustom||e instanceof a.TabInputNotebook)&&(o=e.uri),void 0===o||n.has(o.toString())||(n.add(o.toString()),void 0!==t&&t.add(o))}}}class le{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_traceLogLevel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=c.TraceFormat.Text;_tracer;_c2p;_p2c;_tabsModel;constructor(e,t,n){this._id=e,this._name=t;const i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};void 0!==(n=n||{}).markdown&&(i.isTrusted=ie.sanitizeIsTrusted(n.markdown.isTrusted),i.supportHtml=!0===n.markdown.supportHtml,i.supportThemeIcons=!0===n.markdown.supportThemeIcons),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??Z.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??{},textSynchronization:this.createTextSynchronizationOptions(n.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=oe.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._traceLogLevel=this._outputChannel.logLevel):(this._outputChannel=void 0,this._disposeOutputChannel=!0,this._traceLogLevel=a.LogLevel.Info),this._traceOutputChannel=n.traceOutputChannel,void 0!==this._traceOutputChannel&&(this._traceLogLevel=this._traceOutputChannel.logLevel),this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new h.Semaphore(1),this._pendingChangeDelayer=new h.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new h.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new c.Emitter,this._stateChangeEmitter=new c.Emitter,this._trace=c.Trace.Off,this._tracer={log:(e,t)=>{d.string(e)?this.trace(e,t):this.traceObject(e)}},this._c2p=u.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=l.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e&&"boolean"==typeof e.delayOpenNotifications?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}}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 tabsModel(){return void 0===this._tabsModel&&(this._tabsModel=new ue),this._tabsModel}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=a.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name,{log:!0}),void 0===this._traceOutputChannel&&(this._traceLogLevel=this._outputChannel.logLevel)),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){const t=this.getPublicState();this._state=e;const n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case oe.Starting:return te.Starting;case oe.Running:return te.Running;case oe.StartFailed:return te.StartFailed;default:return te.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===oe.StartFailed||this.$state===oe.Stopping||this.$state===oe.Stopped)return Promise.reject(new c.ResponseError(c.ErrorCodes.ConnectionInactive,"Client is not running"));const n=await this.$start();let i,o;if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===c.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(n),1===t.length?c.CancellationToken.is(t[0])?o=t[0]:i=t[0]:2===t.length&&(i=t[0],o=t[1]),void 0!==o&&o.isCancellationRequested)return Promise.reject(new c.ResponseError(c.LSPErrorCodes.RequestCancelled,"Request got cancelled"));const r=this._clientOptions.middleware?.sendRequest;return void 0!==r?r(e,i,o,(e,t,i)=>{const o=[];return void 0!==t&&o.push(t),void 0!==i&&o.push(i),n.sendRequest(e,...o)}):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 o;return void 0!==i?(this._requestDisposables.set(n,i.onRequest(e,t)),o={dispose:()=>{const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),o={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),o.dispose()}}}async sendNotification(e,t){if(this.$state===oe.StartFailed||this.$state===oe.Stopping||this.$state===oe.Stopped)return Promise.reject(new c.ResponseError(c.ErrorCodes.ConnectionInactive,"Client is not running"));const n=this._didChangeTextDocumentFeature.syncKind===c.TextDocumentSyncKind.Full;let i,o;n&&"string"!=typeof e&&e.method===c.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._inFlightOpenNotifications.add(i)),"string"!=typeof e&&e.method===c.DidCloseTextDocumentNotification.method&&(o=t.textDocument.uri);const r=await this.$start();if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(o))return;n&&await this.sendPendingFullTextDocumentChanges(r),void 0!==i&&this._inFlightOpenNotifications.delete(i);const s=this._clientOptions.middleware?.sendNotification;return s?s(e,r.sendNotification.bind(r),t):r.sendNotification(e,t)}onNotification(e,t){const n="string"==typeof e?e:e.method;this._notificationHandlers.set(n,t);const i=this.activeConnection();let o;return void 0!==i?(this._notificationDisposables.set(n,i.onNotification(e,t)),o={dispose:()=>{const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),o={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),o.dispose()}}}async sendProgress(e,t,n){if(this.$state===oe.StartFailed||this.$state===oe.Stopping||this.$state===oe.Stopped)return Promise.reject(new c.ResponseError(c.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 r=this._clientOptions.middleware?.handleWorkDoneProgress,s=c.WorkDoneProgress.is(e)&&void 0!==r?e=>{r(t,e,()=>n(e))}:n;return void 0!==i?(this._progressDisposables.set(t,i.onProgress(e,t,s)),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 ce(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 c.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?d.string(e.stack)?e.stack:e.message:d.string(e)?e:e.toString()}error(e,t,n=!0){this.outputChannel.error(this.getLogMessage(e,t)),("force"===n||n&&this._clientOptions.revealOutputChannelOn<=Z.Error)&&this.showNotificationMessage(c.MessageType.Error,e,t)}warn(e,t,n=!0){this.outputChannel.warn(this.getLogMessage(e,t)),n&&this._clientOptions.revealOutputChannelOn<=Z.Warn&&this.showNotificationMessage(c.MessageType.Warning,e,t)}info(e,t,n=!0){this.outputChannel.info(this.getLogMessage(e,t)),n&&this._clientOptions.revealOutputChannelOn<=Z.Info&&this.showNotificationMessage(c.MessageType.Info,e,t)}debug(e,t,n=!0){this.outputChannel.debug(this.getLogMessage(e,t)),n&&this._clientOptions.revealOutputChannelOn<=Z.Debug&&this.showNotificationMessage(c.MessageType.Debug,e,t)}trace(e,t){this.traceOutputChannel.trace(this.getLogMessage(e,t))}traceObject(e){this.traceOutputChannel.trace(JSON.stringify(e))}showNotificationMessage(e,t,n){t=t??"A request has failed. See the output for more information.",n&&(t+="\n"+this.data2String(n)),(e===c.MessageType.Error?a.window.showErrorMessage:e===c.MessageType.Warning?a.window.showWarningMessage:a.window.showInformationMessage)(t,"Go to output").then(e=>{void 0!==e&&this.outputChannel.show(!0)})}getLogMessage(e,t){return null!=t?`${e}\n${this.data2String(t)}`:e}needsStart(){return this.$state===oe.Initial||this.$state===oe.Stopping||this.$state===oe.Stopped}needsStop(){return this.$state===oe.Starting||this.$state===oe.Running}activeConnection(){return this.$state===oe.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===oe.Running}async start(){if("disposing"===this._disposed||"disposed"===this._disposed)throw new Error("Client got disposed and can't be restarted.");if(this.$state===oe.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=a.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName??this._id));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=oe.Starting;try{const e=await this.createConnection();e.onNotification(c.LogMessageNotification.type,e=>{switch(e.type){case c.MessageType.Error:this.error(e.message,void 0,!1);break;case c.MessageType.Warning:this.warn(e.message,void 0,!1);break;case c.MessageType.Info:this.info(e.message,void 0,!1);break;case c.MessageType.Debug:this.debug(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}}),e.onNotification(c.ShowMessageNotification.type,e=>{switch(e.type){case c.MessageType.Error:a.window.showErrorMessage(e.message);break;case c.MessageType.Warning:a.window.showWarningMessage(e.message);break;case c.MessageType.Info:default:a.window.showInformationMessage(e.message)}}),e.onRequest(c.ShowMessageRequest.type,e=>{let t;switch(e.type){case c.MessageType.Error:t=a.window.showErrorMessage;break;case c.MessageType.Warning:t=a.window.showWarningMessage;break;case c.MessageType.Info:default:t=a.window.showInformationMessage}const n=e.actions||[];return t(e.message,...n)}),e.onNotification(c.TelemetryEventNotification.type,e=>{this._telemetryEmitter.fire(e)}),e.onRequest(c.ShowDocumentRequest.type,async(e,t)=>{const n=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await a.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 a.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!1}}},i=this._clientOptions.middleware.window?.showDocument;return void 0!==i?i(e,t,n):n(e)}),e.listen(),await this.initialize(e),t()}catch(e){this.$state=oe.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,i]=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],o={processId:null,clientInfo:{name:a.env.appName,version:a.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(a.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:d.func(t)?t():t,trace:c.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(o),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,o);{const t=p.generateUuid(),n=new f.ProgressPart(e,t);o.workDoneToken=t;try{const t=await this.doInitialize(e,o);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!==c.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);let i;this._initializeResult=n,this.$state=oe.Running,d.number(n.capabilities.textDocumentSync)?i=n.capabilities.textDocumentSync===c.TextDocumentSyncKind.None?{openClose:!1,change:c.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(c.PublishDiagnosticsNotification.type,e=>this.handleDiagnostics(e)),e.onRequest(c.RegistrationRequest.type,e=>this.handleRegistrationRequest(e)),e.onRequest("client/registerFeature",e=>this.handleRegistrationRequest(e)),e.onRequest(c.UnregistrationRequest.type,e=>this.handleUnregistrationRequest(e)),e.onRequest("client/unregisterFeature",e=>this.handleUnregistrationRequest(e)),e.onRequest(c.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(c.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookLogLevelChanged(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 c.ResponseError&&t.data&&t.data.retry?a.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then(t=>{t&&"retry"===t.id?this.initialize(e):this.stop()}):(t&&t.message&&a.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){const e=a.workspace.workspaceFolders;if(!e||0===e.length)return;const t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown(se.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t=2e3){if(this.$state===oe.Stopped||this.$state===oe.Initial)return;if(this.$state===oe.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!==oe.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=oe.Stopping,this.cleanUp(e);const i=new Promise(e=>{(0,c.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=oe.Stopped,e===se.Stop&&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();e!==se.Stop&&e!==se.Restart||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()=>{const e=t._fileEvents;t._fileEvents=[];try{await t.sendNotification(c.DidChangeWatchedFilesNotification.type,{changes:e})}catch(n){throw t._fileEvents.push(...e),n}})}const i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,n):n(e)).catch(e=>{t.error("Notifying file events failed.",e)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{const t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(0===t.length)return;for(const n of t){const t=this.code2ProtocolConverter.asChangeTextDocumentParams(n);await e.sendNotification(c.DidChangeTextDocumentNotification.type,t),this._didChangeTextDocumentFeature.notificationSent(n,c.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))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};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,c.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 i=new a.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(n,i.token).then(e=>{if(!i.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)}}).catch(e=>{this.error("Processing diagnostic queue failed.",e)}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return a.env.language}async $start(){if(this.$state===oe.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 r=new de,s=(0,c.createProtocolConnection)(e,t,r,o);return s.onError(e=>{n(e[0],e[1],e[2])}),s.onClose(i),{listen:()=>s.listen(),sendRequest:s.sendRequest,onRequest:s.onRequest,hasPendingResponse:s.hasPendingResponse,sendNotification:s.sendNotification,onNotification:s.onNotification,onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:c.TraceFormat.Text};return void 0===n?s.trace(e,t,i):(d.boolean(n),s.trace(e,t,n))},initialize:e=>s.sendRequest(c.InitializeRequest.type,e),shutdown:()=>s.sendRequest(c.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(c.ExitNotification.type),end:()=>s.end(),dispose:()=>s.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===oe.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:ee.DoNotRestart};if(this.$state!==oe.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===ee.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,!0!==e.handled&&"force"),this.cleanUp(se.Stop),this.$state===oe.Starting?this.$state=oe.StartFailed:this.$state=oe.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===ee.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(se.Restart),this.$state=oe.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===Y.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(a.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)}))}hookLogLevelChanged(e){this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel(t=>{this._traceLogLevel=t,this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){const n=a.workspace.getConfiguration(this._id);let i=this._traceLogLevel!==a.LogLevel.Trace?c.Trace.Off:c.Trace.Messages,o=c.TraceFormat.Text;if(n&&i!==c.Trace.Off){const e=n.get("trace.server","messages");"string"==typeof e?(i=c.Trace.fromString(e),i===c.Trace.Off&&(i=c.Trace.Messages)):(i=c.Trace.fromString(n.get("trace.server.verbosity","messages")),i===c.Trace.Off&&(i=c.Trace.Messages),o=c.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=i,this._traceFormat=o,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch(e=>{this.error("Updating trace failed with error",e,!1)})}hookFileEvents(e){const t=this._clientOptions.synchronize.fileEvents;if(!t)return;let n;n=d.array(t)?t:[t],n&&this._dynamicFeatures.get(c.DidChangeWatchedFilesNotification.type.method).registerRaw(p.generateUuid(),n)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(const t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),g.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(c.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof v.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){const e=new Map;this.registerFeature(new y.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new b.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new b.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new b.WillSaveFeature(this)),this.registerFeature(new b.WillSaveWaitUntilFeature(this)),this.registerFeature(new b.DidSaveTextDocumentFeature(this)),this.registerFeature(new b.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new Q.FileSystemWatcherFeature(this,e=>this.notifyFileEvent(e))),this.registerFeature(new _.CompletionItemFeature(this)),this.registerFeature(new C.HoverFeature(this)),this.registerFeature(new w.SignatureHelpFeature(this)),this.registerFeature(new D.DefinitionFeature(this)),this.registerFeature(new P.ReferencesFeature(this)),this.registerFeature(new S.DocumentHighlightFeature(this)),this.registerFeature(new R.DocumentSymbolFeature(this)),this.registerFeature(new T.WorkspaceSymbolFeature(this)),this.registerFeature(new M.CodeActionFeature(this)),this.registerFeature(new q.CodeLensFeature(this)),this.registerFeature(new F.DocumentFormattingFeature(this)),this.registerFeature(new F.DocumentRangeFormattingFeature(this)),this.registerFeature(new F.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new j.RenameFeature(this)),this.registerFeature(new E.DocumentLinkFeature(this)),this.registerFeature(new N.ExecuteCommandFeature(this)),this.registerFeature(new y.SyncConfigurationFeature(this)),this.registerFeature(new O.TypeDefinitionFeature(this)),this.registerFeature(new k.ImplementationFeature(this)),this.registerFeature(new x.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new B.WorkspaceFoldersFeature(this)),this.registerFeature(new I.FoldingRangeFeature(this)),this.registerFeature(new L.DeclarationFeature(this)),this.registerFeature(new A.SelectionRangeFeature(this)),this.registerFeature(new X.ProgressFeature(this)),this.registerFeature(new H.CallHierarchyFeature(this)),this.registerFeature(new K.SemanticTokensFeature(this)),this.registerFeature(new W.LinkedEditingFeature(this)),this.registerFeature(new V.DidCreateFilesFeature(this)),this.registerFeature(new V.DidRenameFilesFeature(this)),this.registerFeature(new V.DidDeleteFilesFeature(this)),this.registerFeature(new V.WillCreateFilesFeature(this)),this.registerFeature(new V.WillRenameFilesFeature(this)),this.registerFeature(new V.WillDeleteFilesFeature(this)),this.registerFeature(new U.TypeHierarchyFeature(this)),this.registerFeature(new z.InlineValueFeature(this)),this.registerFeature(new $.InlayHintsFeature(this)),this.registerFeature(new m.DiagnosticFeature(this)),this.registerFeature(new v.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(ae.createAll(this))}fillInitializeParams(e){for(const t of this._features)d.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,g.ensure)(e,"workspace").applyEdit=!0;const t=(0,g.ensure)((0,g.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[c.ResourceOperationKind.Create,c.ResourceOperationKind.Rename,c.ResourceOperationKind.Delete],t.failureHandling=c.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0},t.metadataSupport=!0,t.snippetEditSupport=!0;const n=(0,g.ensure)((0,g.ensure)(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[c.DiagnosticTag.Unnecessary,c.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0,(0,g.ensure)((0,g.ensure)(e,"textDocument"),"filters").relativePatternSupport=!0;const i=(0,g.ensure)(e,"window");(0,g.ensure)(i,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,g.ensure)(i,"showDocument").support=!0;const o=(0,g.ensure)(e,"general");o.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(le.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(const t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)d.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=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(t){const n=await t(e,e=>this.doHandleApplyWorkspaceEdit(e));return n instanceof c.ResponseError?Promise.reject(n):n}return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new h.Semaphore(1);async doHandleApplyWorkspaceEdit(e){const t=e.edit,n=await this.workspaceEditLock.lock(()=>this._p2c.asWorkspaceEdit(t)),i=new Map;a.workspace.textDocuments.forEach(e=>i.set(e.uri.toString(),e));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(c.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=this._p2c.asUri(e.textDocument.uri).toString(),n=i.get(t);if(n&&n.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):d.asPromise(a.workspace.applyEdit(n,{isRefactoring:e.metadata?.isRefactoring}).then(e=>({applied:e})))}static RequestsToCancelOnContentModified=new Set([c.SemanticTokensRequest.method,c.SemanticTokensRangeRequest.method,c.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([c.CompletionResolveRequest.method,c.CodeLensResolveRequest.method,c.CodeActionResolveRequest.method,c.InlayHintResolveRequest.method,c.DocumentLinkResolveRequest.method,c.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,t,n,i,o=!0,r=!1){if(n instanceof c.ResponseError){if(n.code===c.ErrorCodes.PendingResponseRejected||n.code===c.ErrorCodes.ConnectionInactive)return i;if(n.code===c.LSPErrorCodes.RequestCancelled||n.code===c.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested&&!r)return i;throw void 0!==n.data?new g.LSPCancellationError(n.data):new a.CancellationError}if(n.code===c.LSPErrorCodes.ContentModified){if(le.RequestsToCancelOnContentModified.has(e.method)||le.CancellableResolveCalls.has(e.method))throw new a.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,n,o),n}}t.BaseLanguageClient=le,t.LanguageClient=class extends le{serverOptions;constructor(e,t,n,i){super(e,t,i),this.serverOptions=n}async createMessageTransports(e){return this.serverOptions()}};class de{error(e){(0,c.RAL)().console.error(e)}warn(e){(0,c.RAL)().console.warn(e)}info(e){(0,c.RAL)().console.info(e)}log(e){(0,c.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[new G.InlineCompletionItemFeature(e),new J.TextDocumentContentFeature(e)]}}(ae||(t.ProposedFeatures=ae={}))},744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const i=n(7096);var o,r;!function(e){e.method="textDocument/inlineValue",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.inlineValue","inlineValueProvider")}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method),e.capabilities=i.CM.create("workspace.inlineValue.refreshSupport",void 0)}(r||(t.InlineValueRefreshRequest=r={}))},986:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentHighlights:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(c.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDocumentHighlights(e,n),e=>i.handleFailedRequest(c.DocumentHighlightRequest.type,n,e,null)),r=i.middleware;return r.provideDocumentHighlights?r.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[a.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentHighlightFeature=d},1003:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9765);class o extends i.AbstractMessageBuffer{static emptyBuffer=new Uint8Array(0);asciiDecoder;constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}class r{socket;_onData;_messageListener;constructor(e){this.socket=e,this._onData=new i.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,i.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class s{socket;constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new r(e),asWritableStream:e=>new s(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const i=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const i=setInterval(e,t,...n);return{dispose:()=>clearInterval(i)}}})});function u(){return c}!function(e){e.install=function(){i.RAL.install(c)}}(u||(u={})),t.default=u},1027:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function r(e){return e&&i(e.then)}Object.defineProperty(t,"__esModule",{value:!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=o,t.stringArray=function(e){return o(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=r,t.asPromise=function(e){return e instanceof Promise?e:r(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}},1121:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(7096);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.typeDefinition","typeDefinitionProvider")}(o||(t.TypeDefinitionRequest=o={}))},1332:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.SymbolInformation{data;hasRange;constructor(e,t,n,i,o){const r=!(i instanceof a.Uri);super(e,t,n,r?i:new a.Location(i,new a.Range(0,0,0,0))),this.hasRange=r,void 0!==o&&(this.data=o)}}t.default=c},1398:e=>{"use strict";e.exports=require("vscode")},1423:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const a=s(n(1398)),c=n(3434),u=n(9810),l=s(n(1027));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[c.SemanticTokenTypes.namespace,c.SemanticTokenTypes.type,c.SemanticTokenTypes.class,c.SemanticTokenTypes.enum,c.SemanticTokenTypes.interface,c.SemanticTokenTypes.struct,c.SemanticTokenTypes.typeParameter,c.SemanticTokenTypes.parameter,c.SemanticTokenTypes.variable,c.SemanticTokenTypes.property,c.SemanticTokenTypes.enumMember,c.SemanticTokenTypes.event,c.SemanticTokenTypes.function,c.SemanticTokenTypes.method,c.SemanticTokenTypes.macro,c.SemanticTokenTypes.keyword,c.SemanticTokenTypes.comment,c.SemanticTokenTypes.string,c.SemanticTokenTypes.number,c.SemanticTokenTypes.regexp,c.SemanticTokenTypes.operator,c.SemanticTokenTypes.decorator,c.SemanticTokenTypes.label],t.tokenModifiers=[c.SemanticTokenModifiers.declaration,c.SemanticTokenModifiers.definition,c.SemanticTokenModifiers.readonly,c.SemanticTokenModifiers.static,c.SemanticTokenModifiers.deprecated,c.SemanticTokenModifiers.abstract,c.SemanticTokenModifiers.async,c.SemanticTokenModifiers.modification,c.SemanticTokenModifiers.documentation,c.SemanticTokenModifiers.defaultLibrary],t.formats=[c.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,u.ensure)((0,u.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(c.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=l.boolean(e.full)?e.full:void 0!==e.full,i=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,o=new a.EventEmitter,r=n?{onDidChangeSemanticTokens:o.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,i=n.middleware,o=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(c.SemanticTokensRequest.type,i,t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,t),e=>n.handleFailedRequest(c.SemanticTokensRequest.type,t,e,null))};return i.provideDocumentSemanticTokens?i.provideDocumentSemanticTokens(e,t,o):o(e,t)},provideDocumentSemanticTokensEdits:i?(e,t,n)=>{const i=this._client,o=i.middleware,r=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return i.sendRequest(c.SemanticTokensDeltaRequest.type,o,n).then(async e=>n.isCancellationRequested?null:c.SemanticTokens.is(e)?await i.protocol2CodeConverter.asSemanticTokens(e,n):await i.protocol2CodeConverter.asSemanticTokensEdits(e,n),e=>i.handleFailedRequest(c.SemanticTokensDeltaRequest.type,n,e,null))};return o.provideDocumentSemanticTokensEdits?o.provideDocumentSemanticTokensEdits(e,t,n,r):r(e,t,n)}:void 0}:void 0,s=!0===e.range?{onDidChangeSemanticTokens:o.event,provideDocumentRangeSemanticTokens:(e,t,n)=>{const i=this._client,o=i.middleware,r=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};return i.sendRequest(c.SemanticTokensRangeRequest.type,o,n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSemanticTokens(e,n),e=>i.handleFailedRequest(c.SemanticTokensRangeRequest.type,n,e,null))};return o.provideDocumentRangeSemanticTokens?o.provideDocumentRangeSemanticTokens(e,t,n,r):r(e,t,n)}}:void 0,u=[],d=this._client,h=d.protocol2CodeConverter.asSemanticTokensLegend(e.legend),p=d.protocol2CodeConverter.asDocumentSelector(t);return void 0!==r&&u.push(a.languages.registerDocumentSemanticTokensProvider(p,r,h)),void 0!==s&&u.push(a.languages.registerDocumentRangeSemanticTokensProvider(p,s,h)),[new a.Disposable(()=>u.forEach(e=>e.dispose())),{range:s,full:r,onDidChangeSemanticTokensEmitter:o}]}}t.SemanticTokensFeature=d},1936:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CodeLens{data;constructor(e){super(e)}}t.default=c},1977:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const c=a(n(9042)),u=s(n(6357)),l=n(6712),d=n(7975);var h,p;!function(e){e.is=function(e){const t=e;return t&&u.func(t.listen)&&u.func(t.dispose)&&u.func(t.onError)&&u.func(t.onClose)&&u.func(t.onPartialMessage)}}(h||(t.MessageReader=h={}));class f{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.Emitter,this.partialMessageEmitter=new l.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.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: ${u.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=f,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let o;const r=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,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(o=e.contentTypeDecoder,r.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)r.set(t.name,t)}return void 0===o&&(o=(0,c.default)().applicationJson.decoder,r.set(o.name,o)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:o,contentTypeDecoders:r}}}(p||(p={})),t.ReadableStreamMessageReader=class extends f{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super(),this.readable=e,this.options=p.fromOptions(t),this.buffer=(0,c.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new d.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,c.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))}}},2049:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CallHierarchyItem{data;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=c},2114:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const a=n(1398),c=n(3434),u=s(n(8820)),l=n(9810);class d extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,l.ensure)((0,l.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit","command"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[c.CodeActionKind.Empty,c.CodeActionKind.QuickFix,c.CodeActionKind.Refactor,c.CodeActionKind.RefactorExtract,c.CodeActionKind.RefactorInline,c.CodeActionKind.RefactorMove,c.CodeActionKind.RefactorRewrite,c.CodeActionKind.Source,c.CodeActionKind.SourceOrganizeImports,c.CodeActionKind.Notebook]}},t.honorsChangeAnnotations=!0,t.documentationSupport=!0,t.tagSupport={valueSet:[c.CodeActionTag.LLMGenerated]}}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideCodeActions:(e,t,n,i)=>{const o=this._client,r=async(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContextSync(n)};return o.sendRequest(c.CodeActionRequest.type,r,i).then(e=>i.isCancellationRequested||null==e?null:o.protocol2CodeConverter.asCodeActionResult(e,i),e=>o.handleFailedRequest(c.CodeActionRequest.type,i,e,null))},s=o.middleware;return s.provideCodeActions?s.provideCodeActions(e,t,n,i,r):r(e,t,n,i)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.middleware,o=async(e,t)=>n.sendRequest(c.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeActionSync(e),t).then(i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeAction(i,t),i=>n.handleFailedRequest(c.CodeActionResolveRequest.type,t,i,e));return i.resolveCodeAction?i.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[a.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,this.getMetadata(e)),n]}getMetadata(e){if(void 0!==e.codeActionKinds||void 0!==e.documentation)return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}}t.CodeActionFeature=d},2124:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=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=function(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)};const r=n(571);o(n(571),t),o(n(3434),t)},2216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomDataSource=function(e){let t=r(),n=s();const o=new i.EventEmitter;return e.push(i.extensions.onDidChange(e=>{const t=s();t.length===n.length&&t.every((e,t)=>e===n[t])||(n=t,o.fire())})),e.push(i.workspace.onDidChangeConfiguration(e=>{e.affectsConfiguration("css.customData")&&(t=r(),o.fire())})),{get uris(){return t.concat(n)},get onDidChange(){return o.event}}};const i=n(1398),o=n(3789);function r(){const e=i.workspace.workspaceFolders,t=[];if(!e)return t;const n=(e,n)=>{if(Array.isArray(e))for(const i of e)"string"==typeof i&&t.push(o.Utils.resolvePath(n,i).toString())};for(let t=0;t<e.length;t++){const o=e[t].uri,r=i.workspace.getConfiguration("css",o).inspect("customData");r&&(n(r.workspaceFolderValue,o),0===t&&(i.workspace.workspaceFile&&n(r.workspaceValue,i.workspace.workspaceFile),n(r.globalValue,o)))}return t}function s(){const e=[];for(const t of i.extensions.all){const n=t.packageJSON?.contributes?.css?.customData;if(Array.isArray(n))for(const i of n)e.push(o.Utils.joinPath(t.extensionUri,i).toString())}return e}},2358:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Mimes=t.Schemes=void 0,t.getDocumentDir=function(e){const n=function(e){if(e.scheme===t.Schemes.notebookCell)for(const t of a.workspace.notebookDocuments)for(const n of t.getCells())if(n.document.uri.toString()===e.toString())return t.uri;return e}(e);return n.scheme===t.Schemes.untitled?a.workspace.workspaceFolders?.[0]?.uri:c.Utils.dirname(n)};const a=s(n(1398)),c=n(3789);t.Schemes=Object.freeze({file:"file",notebookCell:"vscode-notebook-cell",untitled:"untitled"}),t.Mimes=Object.freeze({plain:"text/plain",uriList:"text/uri-list"})},2434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const i=n(7096);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.implementation","implementationProvider")}(o||(t.ImplementationRequest=o={}))},2549:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const c=a(n(9042)),u=s(n(6357)),l=n(7975),d=n(6712);var h,p;!function(e){e.is=function(e){const t=e;return t&&u.func(t.dispose)&&u.func(t.onClose)&&u.func(t.onError)&&u.func(t.write)}}(h||(t.MessageWriter=h={}));class f{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new d.Emitter,this.closeEmitter=new d.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: ${u.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=f,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,c.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,c.default)().applicationJson.encoder}}}(p||(p={})),t.WriteableStreamMessageWriter=class extends f{writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=p.fromOptions(t),this.errorCount=0,this.writeSemaphore=new l.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()}}},2661:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const a=s(n(1398)),c=s(n(3434)),u=n(9810);class l extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){const[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(c.LinkedEditingRangeRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asLinkedEditingRanges(e,n),e=>i.handleFailedRequest(c.LinkedEditingRangeRequest.type,n,e,null)),r=i.middleware;return r.provideLinkedEditingRange?r.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=l},2685:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=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,o(n(3434),t),o(n(9810),t);var r=n(7034);Object.defineProperty(t,"vsdiag",{enumerable:!0,get:function(){return r.vsdiag}}),Object.defineProperty(t,"DiagnosticPullMode",{enumerable:!0,get:function(){return r.DiagnosticPullMode}}),o(n(710),t)},2758:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionItemFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.InlineCompletionRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"inlineCompletion").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.inlineCompletionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideInlineCompletionItems:(e,t,n,i)=>{const o=this._client,r=this._client.middleware,s=(e,t,n,i)=>o.sendRequest(c.InlineCompletionRequest.type,o.code2ProtocolConverter.asInlineCompletionParams(e,t,n),i).then(e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asInlineCompletionResult(e,i),e=>o.handleFailedRequest(c.InlineCompletionRequest.type,i,e,null));return r.provideInlineCompletionItems?r.provideInlineCompletionItems(e,t,n,i,s):s(e,t,n,i)}};return[a.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.InlineCompletionItemFeature=d},2795:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(7096);var o,r,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(o||(t.UniquenessLevel=o={})),function(e){e.$import="import",e.$export="export",e.local="local"}(r||(t.MonikerKind=r={})),function(e){e.method="textDocument/moniker",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.moniker","monikerProvider")}(s||(t.MonikerRequest=s={}))},2837:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const a=n(1398),c=n(3434),u=s(n(8820)),l=n(9810);t.ExecuteCommandFeature=class{_client;_commands;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 c.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,l.ensure)((0,l.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:u.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.middleware,i=(e,n)=>{const i={command:e,arguments:n};return t.sendRequest(c.ExecuteCommandRequest.type,i).then(void 0,e=>t.handleFailedRequest(c.ExecuteCommandRequest.type,void 0,e,void 0))};if(e.registerOptions.commands){const t=[];for(const o of e.registerOptions.commands)t.push(a.commands.registerCommand(o,(...e)=>n.executeCommand?n.executeCommand(o,e,i):i(o,e)));this._commands.set(e.id,t)}}unregister(e){const t=this._commands.get(e);t&&(this._commands.delete(e),t.forEach(e=>e.dispose()))}clear(){this._commands.forEach(e=>{e.forEach(e=>e.dispose())}),this._commands.clear()}}},2855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.FoldingRangeRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[o.FoldingRangeKind.Comment,o.FoldingRangeKind.Imports,o.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,r.ensure)((0,r.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.FoldingRangeRefreshRequest.type,async()=>{for(const e of this.getAllProviders())e.onDidChangeFoldingRange.fire()});const[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,r={onDidChangeFoldingRanges:n.event,provideFoldingRanges:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(o.FoldingRangeRequest.type,r,n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asFoldingRanges(e,n),e=>i.handleFailedRequest(o.FoldingRangeRequest.type,n,e,null))},s=i.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,r):r(e,0,n)}};return[i.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),{provider:r,onDidChangeFoldingRange:n}]}}t.FoldingRangeFeature=s},2946:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CodeAction{data;constructor(e,t){super(e),this.data=t}}t.default=c},3075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startClient=async function(e,t,n){const u=(0,r.getCustomDataSource)(e.subscriptions),l=["css","scss","less"],d=l.map(e=>({languageId:e,settingId:`${e}.format.enable`,provider:void 0})),h={documentSelector:l,synchronize:{configurationSection:["css","scss","less"]},initializationOptions:{handledSchemas:["file"],provideFormatter:!1,customCapabilities:{rangeFormatting:{editLimit:1e4}}},middleware:{provideCompletionItem(e,t,n,o,r){function s(e){const n=e.range;n instanceof i.Range&&n.end.isAfter(t)&&n.start.isBeforeOrEqual(t)&&(e.range={inserting:new i.Range(n.start,t),replacing:n})}function a(e){e.kind===i.CompletionItemKind.Color&&(e.label={label:e.label,description:e.documentation})}function c(e){return e&&((Array.isArray(e)?e:e.items).forEach(s),(Array.isArray(e)?e:e.items).forEach(a)),e}const u=r(e,t,n,o);return(l=u)&&"function"==typeof l.then?u.then(c):c(u);var l}}},p=t("css",i.l10n.t("CSS Language Server"),h);p.registerProposedFeatures(),await p.start(),p.sendNotification(a.type,u.uris),u.onDidChange(()=>{p.sendNotification(a.type,u.uris)});for(const t of d)f(t),e.subscriptions.push({dispose:()=>t.provider?.dispose()}),e.subscriptions.push(i.workspace.onDidChangeConfiguration(e=>e.affectsConfiguration(t.settingId)&&f(t)));function f(e){const t=i.workspace.getConfiguration().get(e.settingId);!t&&e.provider?(e.provider.dispose(),e.provider=void 0):t&&!e.provider&&(e.provider=i.languages.registerDocumentRangeFormattingEditProvider(e.languageId,{provideDocumentRangeFormattingEdits(t,n,r,s){const a=i.workspace.getConfiguration("files",t),u={trimTrailingWhitespace:a.get("trimTrailingWhitespace"),trimFinalNewlines:a.get("trimFinalNewlines"),insertFinalNewline:a.get("insertFinalNewline")},l={textDocument:p.code2ProtocolConverter.asTextDocumentIdentifier(t),range:p.code2ProtocolConverter.asRange(n),options:p.code2ProtocolConverter.asFormattingOptions(r,u)},d=i.workspace.getConfiguration(e.languageId,t).get("format");if(d)for(const e of c){const t=d[e];null!=t&&(l.options[e]=t)}return p.sendRequest(o.DocumentRangeFormattingRequest.type,l,s).then(p.protocol2CodeConverter.asTextEdits,e=>(p.handleFailedRequest(o.DocumentRangeFormattingRequest.type,void 0,e,[]),Promise.resolve([])))}}))}return(0,s.serveFileSystemRequests)(p,n),e.subscriptions.push(function(){const e=/^(\s*)(\/(\*\s*(#\w*)?)?)?$/;return i.languages.registerCompletionItemProvider(l,{provideCompletionItems(t,n){const o=t.getText(new i.Range(new i.Position(n.line,0),n)).match(e);if(o){const e=new i.Range(new i.Position(n.line,o[1].length),n),t=new i.CompletionItem("#region",i.CompletionItemKind.Snippet);t.range=e,i.TextEdit.replace(e,"/* #region */"),t.insertText=new i.SnippetString("/* #region $1*/"),t.documentation=i.l10n.t("Folding Region Start"),t.filterText=o[2],t.sortText="za";const r=new i.CompletionItem("#endregion",i.CompletionItemKind.Snippet);return r.range=e,r.insertText="/* #endregion */",r.documentation=i.l10n.t("Folding Region End"),r.sortText="zb",r.filterText=o[2],[t,r]}return null}})}()),i.commands.registerCommand("_css.applyCodeAction",function(e,t,n){const o=i.window.activeTextEditor;o&&o.document.uri.toString()===e&&(o.document.version!==t&&i.window.showInformationMessage(i.l10n.t("CSS fix is outdated and can't be applied to the document.")),o.edit(e=>{for(const t of n)e.replace(p.protocol2CodeConverter.asRange(t.range),t.newText)}).then(e=>{e||i.window.showErrorMessage(i.l10n.t("Failed to apply CSS fix to the document. Please consider opening an issue with steps to reproduce."))}))}),p};const i=n(1398),o=n(2685),r=n(2216),s=n(6685);var a;!function(e){e.type=new o.NotificationType("css/customDataChanged")}(a||(a={}));const c=["newlineBetweenSelectors","newlineBetweenRules","spaceAroundSelectorSeparator","braceStyle","preserveNewLines","maxPreserveNewLines"]},3167:(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={}))},3219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(7096);var o,r;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method),e.capabilities=i.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.capabilities=i.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")}(r||(t.DidChangeWorkspaceFoldersNotification=r={}))},3337:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=t.balanced=void 0,t.balanced=(e,i,o)=>{const r=e instanceof RegExp?n(e,o):e,s=i instanceof RegExp?n(i,o):i,a=null!==r&&null!=s&&(0,t.range)(r,s,o);return a&&{start:a[0],end:a[1],pre:o.slice(0,a[0]),body:o.slice(a[0]+r.length,a[1]),post:o.slice(a[1]+s.length)}};const n=(e,t)=>{const n=t.match(e);return n?n[0]:null};t.range=(e,t,n)=>{let i,o,r,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=[],r=n.length;l>=0&&!a;){if(l===c)i.push(l),c=n.indexOf(e,l+1);else if(1===i.length){const e=i.pop();void 0!==e&&(a=[e,u])}else o=i.pop(),void 0!==o&&o<r&&(r=o,s=u),u=n.indexOf(t,l+1);l=c<u&&c>=0?c:u}i.length&&void 0!==s&&(a=[r,s])}return a}},3420:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const i=n(632),o=n(3844),r=n(4124),s=n(5261),a=n(4970);t.minimatch=(e,t,n={})=>((0,o.assertValidPattern)(t),!(!n.nocomment&&"#"===t.charAt(0))&&new M(t,n).match(e));const c=/^\*+([^+@!?\*\[\(]*)$/,u=e=>t=>!t.startsWith(".")&&t.endsWith(e),l=e=>t=>t.endsWith(e),d=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),h=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),p=/^\*+\.\*+$/,f=e=>!e.startsWith(".")&&e.includes("."),g=e=>"."!==e&&".."!==e&&e.includes("."),m=/^\.\*+$/,v=e=>"."!==e&&".."!==e&&e.startsWith("."),y=/^\*+$/,b=e=>0!==e.length&&!e.startsWith("."),_=e=>0!==e.length&&"."!==e&&".."!==e,C=/^\?+([^+@!?\*\[\(]*)?$/,D=([e,t=""])=>{const n=T([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},w=([e,t=""])=>{const n=P([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},S=([e,t=""])=>{const n=P([e]);return t?e=>n(e)&&e.endsWith(t):n},R=([e,t=""])=>{const n=T([e]);return t?e=>n(e)&&e.endsWith(t):n},T=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},P=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},O="object"==typeof process&&process?{}&&{}.__MINIMATCH_TESTING_PLATFORM__||"web":"posix";t.sep="win32"===O?"\\":"/",t.minimatch.sep=t.sep,t.GLOBSTAR=Symbol("globstar **"),t.minimatch.GLOBSTAR=t.GLOBSTAR,t.filter=(e,n={})=>i=>(0,t.minimatch)(i,e,n),t.minimatch.filter=t.filter;const k=(e,t={})=>Object.assign({},e,t);t.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return t.minimatch;const n=t.minimatch;return Object.assign((t,i,o={})=>n(t,i,k(e,o)),{Minimatch:class extends n.Minimatch{constructor(t,n={}){super(t,k(e,n))}static defaults(t){return n.defaults(k(e,t)).Minimatch}},AST:class extends n.AST{constructor(t,n,i={}){super(t,n,k(e,i))}static fromGlob(t,i={}){return n.AST.fromGlob(t,k(e,i))}},unescape:(t,i={})=>n.unescape(t,k(e,i)),escape:(t,i={})=>n.escape(t,k(e,i)),filter:(t,i={})=>n.filter(t,k(e,i)),defaults:t=>n.defaults(k(e,t)),makeRe:(t,i={})=>n.makeRe(t,k(e,i)),braceExpand:(t,i={})=>n.braceExpand(t,k(e,i)),match:(t,i,o={})=>n.match(t,i,k(e,o)),sep:n.sep,GLOBSTAR:t.GLOBSTAR})},t.minimatch.defaults=t.defaults,t.braceExpand=(e,t={})=>((0,o.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,i.expand)(e)),t.minimatch.braceExpand=t.braceExpand,t.makeRe=(e,t={})=>new M(e,t).makeRe(),t.minimatch.makeRe=t.makeRe,t.match=(e,t,n={})=>{const i=new M(t,n);return e=e.filter(e=>i.match(e)),i.options.nonull&&!e.length&&e.push(t),e},t.minimatch.match=t.match;const x=/[?*]|[+@!]\(.*?\)|\[|\]/;class M{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,o.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||O,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}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(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&x.test(e[2])||x.test(e[3])),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,i),this.set=i.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)"**"===e[t][n]&&(e[t][n]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let n=t;for(;"**"===e[n+1];)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{const n=e[e.length-1];return"**"===t&&"**"===n?e:".."===t&&n&&".."!==n&&"."!==n&&"**"!==n?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){const i=e[n];1===n&&""===i&&""===e[0]||"."!==i&&""!==i||(t=!0,e.splice(n,1),n--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let n=0;for(;-1!==(n=e.indexOf("..",n+1));){const i=e[n-1];i&&"."!==i&&".."!==i&&"**"!==i&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let i=-1;for(;-1!==(i=n.indexOf("**",i+1));){let o=i;for(;"**"===n[o+1];)o++;o>i&&n.splice(i+1,o-i);let r=n[i+1];const s=n[i+2],a=n[i+3];if(".."!==r)continue;if(!s||"."===s||".."===s||!a||"."===a||".."===a)continue;t=!0,n.splice(i,1);const c=n.slice(0);c[i]="**",e.push(c),i--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){const i=n[e];1===e&&""===i&&""===n[0]||"."!==i&&""!==i||(t=!0,n.splice(e,1),e--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(t=!0,n.pop())}let o=0;for(;-1!==(o=n.indexOf("..",o+1));){const e=n[o-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===o&&"**"===n[o+1]?["."]:[];n.splice(o-1,2,...e),0===n.length&&n.push(""),o-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){const i=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(i){e[t]=[],e[n]=i;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let i=0,o=0,r=[],s="";for(;i<e.length&&o<t.length;)if(e[i]===t[o])r.push("b"===s?t[o]:e[i]),i++,o++;else if(n&&"**"===e[i]&&t[o]===e[i+1])r.push(e[i]),i++;else if(n&&"**"===t[o]&&e[i]===t[o+1])r.push(t[o]),o++;else if("*"!==e[i]||!t[o]||!this.options.dot&&t[o].startsWith(".")||"**"===t[o]){if("*"!==t[o]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i])return!1;if("a"===s)return!1;s="b",r.push(t[o]),i++,o++}else{if("b"===s)return!1;s="a",r.push(e[i]),i++,o++}return e.length===t.length&&r}parseNegate(){if(this.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,n,i=!1){const o=this.options;if(this.isWindows){const t="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),i=!t&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),o="string"==typeof n[0]&&/^[a-z]:$/i.test(n[0]),r=i?3:t?0:void 0,s=!o&&""===n[0]&&""===n[1]&&"?"===n[2]&&"string"==typeof n[3]&&/^[a-z]:$/i.test(n[3])?3:o?0:void 0;if("number"==typeof r&&"number"==typeof s){const[t,i]=[e[r],n[s]];t.toLowerCase()===i.toLowerCase()&&(n[s]=t,s>r?n=n.slice(s):r>s&&(e=e.slice(r)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:n}),this.debug("matchOne",e.length,n.length);for(var s=0,a=0,c=e.length,u=n.length;s<c&&a<u;s++,a++){this.debug("matchOne loop");var l=n[a],d=e[s];if(this.debug(n,l,d),!1===l)return!1;if(l===t.GLOBSTAR){this.debug("GLOBSTAR",[n,l,d]);var h=s,p=a+1;if(p===u){for(this.debug("** at the end");s<c;s++)if("."===e[s]||".."===e[s]||!o.dot&&"."===e[s].charAt(0))return!1;return!0}for(;h<c;){var f=e[h];if(this.debug("\nglobstar while",e,h,n,p,f),this.matchOne(e.slice(h),n.slice(p),i))return this.debug("globstar found match!",h,c,f),!0;if("."===f||".."===f||!o.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,h,n,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!i||(this.debug("\n>>> no match, partial?",e,h,n,p),h!==c))}let r;if("string"==typeof l?(r=d===l,this.debug("string match",l,d,r)):(r=l.test(d),this.debug("pattern match",l,d,r)),!r)return!1}if(s===c&&a===u)return!0;if(s===c)return i;if(a===u)return s===c-1&&""===e[s];throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,o.assertValidPattern)(e);const n=this.options;if("**"===e)return t.GLOBSTAR;if(""===e)return"";let i,s=null;(i=e.match(y))?s=n.dot?_:b:(i=e.match(c))?s=(n.nocase?n.dot?h:d:n.dot?l:u)(i[1]):(i=e.match(C))?s=(n.nocase?n.dot?w:D:n.dot?S:R)(i):(i=e.match(p))?s=n.dot?g:f:(i=e.match(m))&&(s=v);const a=r.AST.fromGlob(e,this.options).toMMPattern();return s&&"object"==typeof a&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const n=this.options,i=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=new Set(n.nocase?["i"]:[]);let r=e.map(e=>{const n=e.map(e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))o.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===t.GLOBSTAR?t.GLOBSTAR:e._src});return n.forEach((e,o)=>{const r=n[o+1],s=n[o-1];e===t.GLOBSTAR&&s!==t.GLOBSTAR&&(void 0===s?void 0!==r&&r!==t.GLOBSTAR?n[o+1]="(?:\\/|"+i+"\\/)?"+r:n[o]=i:void 0===r?n[o-1]=s+"(?:\\/|"+i+")?":r!==t.GLOBSTAR&&(n[o-1]=s+"(?:\\/|\\/"+i+"\\/)"+r,n[o+1]=t.GLOBSTAR))}),n.filter(e=>e!==t.GLOBSTAR).join("/")}).join("|");const[s,a]=e.length>1?["(?:",")"]:["",""];r="^"+s+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...o].join(""))}catch(e){this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}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;this.isWindows&&(e=e.split("\\").join("/"));const i=this.slashSplit(e);this.debug(this.pattern,"split",i);const o=this.set;this.debug(this.pattern,"set",o);let r=i[i.length-1];if(!r)for(let e=i.length-2;!r&&e>=0;e--)r=i[e];for(let e=0;e<o.length;e++){const s=o[e];let a=i;if(n.matchBase&&1===s.length&&(a=[r]),this.matchOne(a,s,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return t.minimatch.defaults(e).Minimatch}}t.Minimatch=M;var q=n(4124);Object.defineProperty(t,"AST",{enumerable:!0,get:function(){return q.AST}});var F=n(5261);Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return F.escape}});var j=n(4970);Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return j.unescape}}),t.minimatch.AST=r.AST,t.minimatch.Minimatch=M,t.minimatch.escape=s.escape,t.minimatch.unescape=a.unescape},3434:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=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,o(n(9765),t),o(n(4437),t),o(n(7096),t),o(n(6948),t);var r,s=n(7784);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}(r||(t.LSPErrorCodes=r={}))},3507:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820)),d=[c.CompletionItemKind.Text,c.CompletionItemKind.Method,c.CompletionItemKind.Function,c.CompletionItemKind.Constructor,c.CompletionItemKind.Field,c.CompletionItemKind.Variable,c.CompletionItemKind.Class,c.CompletionItemKind.Interface,c.CompletionItemKind.Module,c.CompletionItemKind.Property,c.CompletionItemKind.Unit,c.CompletionItemKind.Value,c.CompletionItemKind.Enum,c.CompletionItemKind.Keyword,c.CompletionItemKind.Snippet,c.CompletionItemKind.Color,c.CompletionItemKind.File,c.CompletionItemKind.Reference,c.CompletionItemKind.Folder,c.CompletionItemKind.EnumMember,c.CompletionItemKind.Constant,c.CompletionItemKind.Struct,c.CompletionItemKind.Event,c.CompletionItemKind.Operator,c.CompletionItemKind.TypeParameter];class h extends u.TextDocumentLanguageFeature{labelDetailsSupport;constructor(e){super(e,c.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[c.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[c.InsertTextMode.asIs,c.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=c.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:d},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"],applyKindSupport:!0}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const n=e.triggerCharacters??[],i=e.allCommitCharacters,o=e.documentSelector,r={provideCompletionItems:(e,t,n,o)=>{const r=this._client,s=this._client.middleware,a=(e,t,n,o)=>r.sendRequest(c.CompletionRequest.type,r.code2ProtocolConverter.asCompletionParams(e,t,n),o).then(e=>o.isCancellationRequested?null:r.protocol2CodeConverter.asCompletionResult(e,i,o),e=>r.handleFailedRequest(c.CompletionRequest.type,o,e,null));return s.provideCompletionItem?s.provideCompletionItem(e,t,o,n,a):a(e,t,o,n)},resolveCompletionItem:e.resolveProvider?(e,n)=>{const i=this._client,o=this._client.middleware,r=(e,n)=>i.sendRequest(c.CompletionResolveRequest.type,i.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCompletionItem(e),t=>i.handleFailedRequest(c.CompletionResolveRequest.type,n,t,e));return o.resolveCompletionItem?o.resolveCompletionItem(e,n,r):r(e,n)}:void 0};return[a.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(o),r,...n),r]}}t.CompletionItemFeature=h},3544:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.registerDropOrPasteResourceSupport=function(e){const t=new d;return c.Disposable.from(c.languages.registerDocumentDropEditProvider(e,t,{providedDropEditKinds:[t.kind],dropMimeTypes:[u.Mimes.uriList,"files"]}),c.languages.registerDocumentPasteEditProvider(e,t,{providedPasteEditKinds:[t.kind],pasteMimeTypes:[u.Mimes.uriList,"files"]}))};const a=s(n(7173)),c=s(n(1398)),u=n(2358),l=n(5429);class d{kind=c.DocumentDropOrPasteEditKind.Empty.append("css","link","url");async provideDocumentDropEdits(e,t,n,i){const o=await this.getUriList(n);if(!o.entries.length||i.isCancellationRequested)return;const r=await this.createUriListSnippet(e.uri,o);return r&&!i.isCancellationRequested?{kind:this.kind,title:r.label,insertText:r.snippet.value,yieldTo:this.pasteAsCssUrlByDefault(e,t)?[]:[c.DocumentDropOrPasteEditKind.Empty.append("uri")]}:void 0}async provideDocumentPasteEdits(e,t,n,i,o){const r=await this.getUriList(n);if(!r.entries.length||o.isCancellationRequested)return;const s=await this.createUriListSnippet(e.uri,r);return s&&!o.isCancellationRequested?[{kind:this.kind,title:s.label,insertText:s.snippet.value,yieldTo:this.pasteAsCssUrlByDefault(e,t[0].start)?[]:[c.DocumentDropOrPasteEditKind.Empty.append("uri")]}]:void 0}async getUriList(e){const t=await(e.get(u.Mimes.uriList)?.asString());if(t)return l.UriList.from(t);const n=[];for(const[t,i]of e){const e=i.asFile();e?.uri&&n.push(e.uri)}return new l.UriList(n.map(e=>({uri:e,str:e.toString(!0)})))}async createUriListSnippet(e,t){if(!t.entries.length)return;const n=new c.SnippetString;for(let i=0;i<t.entries.length;i++){const o=t.entries[i],r=h((0,u.getDocumentDir)(e),o.uri)??o.str;n.appendText(`url(${r})`),i!==t.entries.length-1&&n.appendText(" ")}return{snippet:n,label:t.entries.length>1?c.l10n.t("Insert url() Functions"):c.l10n.t("Insert url() Function")}}pasteAsCssUrlByDefault(e,t){const n=/url\(.+?\)/gi;for(const i of Array.from(e.lineAt(t.line).text.matchAll(n)))if(t.character>i.index&&t.character<i.index+i[0].length)return!1;return!0}}function h(e,t){if(e&&e.scheme===t.scheme&&e.authority===t.authority){if(t.scheme===u.Schemes.file){const n=a.relative(e.fsPath,t.fsPath);return a.posix.normalize(n.split(a.sep).join(a.posix.sep))}return a.posix.relative(e.path,t.path)}}},3562:(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(7096);var o,r,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new i.RegistrationType(e.method)}(r||(t.SemanticTokensRegistrationType=r={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method,e.capabilities=i.CM.create("textDocument.semanticTokens","semanticTokensProvider")}(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=r.method,e.capabilities=i.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")}(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=r.method,e.capabilities=i.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method),e.capabilities=i.CM.create("workspace.semanticTokens.refreshSupport",void 0)}(u||(t.SemanticTokensRefreshRequest=u={}))},3563:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.matchGlobPattern=function(e,t){let n;if("string"==typeof e)n=e.replace(/\\/g,"/");else try{const t=c.Uri.parse("string"==typeof e.baseUri?e.baseUri:e.baseUri.uri);n=t.with({path:t.path+"/"+e.pattern}).fsPath.replace(/\\/g,"/")}catch(e){return!1}const i=new a.Minimatch(n,{noext:!0});return!!i.makeRe()&&i.match(t.fsPath)};const a=s(n(3420)),c=n(1398)},3587:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=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.LanguageClient=void 0;const r=n(2685),s=n(2124);o(n(2124),t),o(n(2685),t);class a extends r.BaseLanguageClient{serverOptions;constructor(e,t,n,i){super(e,t,i),this.serverOptions=n}async createMessageTransports(e){if("function"==typeof this.serverOptions){const e=await this.serverOptions();return e instanceof Worker?this.createMessageTransportsFromWorker(e):e}return this.createMessageTransportsFromWorker(this.serverOptions)}createMessageTransportsFromWorker(e){const t=new s.BrowserMessageReader(e),n=new s.BrowserMessageWriter(e);return Promise.resolve({reader:t,writer:n})}}t.LanguageClient=a},3633:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});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 a=n(4437),c=s(n(7786)),u=n(7096);var l,d,h,p,f,g,m,v,y,b;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(l||(t.NotebookCellKind=l={})),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 c.objectLiteral(t)&&a.uinteger.is(t.executionOrder)&&(void 0===t.success||c.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(d||(t.ExecutionSummary=d={})),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(c.objectLiteral(e)&&c.objectLiteral(n)){const i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!t(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!t(e[r],n[r]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return c.objectLiteral(t)&&l.is(t.kind)&&a.DocumentUri.is(t.document)&&(void 0===t.metadata||c.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||d.equals(e.executionSummary,n.executionSummary)||i.add("executionSummary"),i}}(h||(t.NotebookCell=h={})),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 c.objectLiteral(t)&&c.string(t.uri)&&a.integer.is(t.version)&&c.typedArray(t.cells,h.is)}}(p||(t.NotebookDocument=p={})),function(e){e.method="notebookDocument/sync",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.RegistrationType(e.method)}(f||(t.NotebookDocumentSyncRegistrationType=f={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(g||(t.DidOpenNotebookDocumentNotification=g={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&a.uinteger.is(t.start)&&a.uinteger.is(t.deleteCount)&&(void 0===t.cells||c.typedArray(t.cells,h.is))},e.create=function(e,t,n){const i={start:e,deleteCount:t};return void 0!==n&&(i.cells=n),i}}(m||(t.NotebookCellArrayChange=m={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(v||(t.DidChangeNotebookDocumentNotification=v={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(y||(t.DidSaveNotebookDocumentNotification=y={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(b||(t.DidCloseNotebookDocumentNotification=b={}))},3652:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=n(7984),d=s(n(8820));class h extends u.WorkspaceFeature{constructor(e){super(e,c.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:l.SupportedSymbolKinds},t.tagSupport={valueSet:l.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:d.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(c.WorkspaceSymbolRequest.type,{query:e},t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformations(e,t),e=>n.handleFailedRequest(c.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(c.WorkspaceSymbolResolveRequest.type,n.code2ProtocolConverter.asWorkspaceSymbol(e),t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformation(e),e=>n.handleFailedRequest(c.WorkspaceSymbolResolveRequest.type,t,e,null)),o=n.middleware;return o.resolveWorkspaceSymbol?o.resolveWorkspaceSymbol(e,t,i):i(e,t)}:void 0};return[a.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=h},3760:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const a=n(1398),c=n(3434),u=s(n(8820)),l=n(9810);class d extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.CodeLensRequest.type)}fillClientCapabilities(e){const t=(0,l.ensure)((0,l.ensure)(e,"textDocument"),"codeLens");t.dynamicRegistration=!0,t.resolveSupport={properties:["command"]},(0,l.ensure)((0,l.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(c.CodeLensRefreshRequest.type,async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()});const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n=new a.EventEmitter,i={onDidChangeCodeLenses:n.event,provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCodeLenses(e,t),e=>n.handleFailedRequest(c.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(c.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then(i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeLens(i),i=>n.handleFailedRequest(c.CodeLensResolveRequest.type,t,i,e)),o=n.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[a.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:n}]}}t.CodeLensFeature=d},3789:function(e){var t;t=()=>(()=>{"use strict";var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",o=0,r=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(r===a-1||1===s);else if(r!==a-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",o=0):o=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),r=a,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),o=a-r-1;r=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var i={resolve:function(){for(var e,i="",o=!1,r=arguments.length-1;r>=-1&&!o;r--){var s;r>=0?s=arguments[r]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=n(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&o&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var r=e.length,s=r-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(o+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var p="";for(d=o+l+1;d<=r;++d)d!==r&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,o=-1,r=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!r){o=s;break}}else r=!1;return-1===o?i?"/":".":i&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,o=0,r=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(47===u){if(!s){o=i+1;break}}else-1===c&&(s=!1,c=i+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(r=i):(a=-1,r=c))}return o===r?r=c:-1===r&&(r=e.length),e.slice(o,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){o=i+1;break}}else-1===r&&(s=!1,r=i+1);return-1===r?"":e.slice(o,r)},extname:function(e){t(e);for(var n=-1,i=0,o=-1,r=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(r=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!r){i=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,o=e.charCodeAt(0),r=47===o;r?(n.root="/",i=1):i=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=i;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&r?e.slice(1,c):e.slice(a,c)):(0===a&&r?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):r&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},70:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows=!1;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},231:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const i=n(70),o=/^\w[\w\d+.-]*$/,r=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,i,o,r=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,r),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,n||c),this.query=i||c,this.fragment=o||c,a(this,r))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===i?i=this.path:null===i&&(i=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new p(t,n,i,o,r)}static parse(e,t=!1){const n=l.exec(e);return n?new p(n[2]||c,C(n[4]||c),C(n[5]||c),C(n[7]||c),C(n[9]||c),t):new p(c,c,c,c,c)}static file(e){let t=c;if(i.isWindows&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const n=e.indexOf(u,2);-1===n?(t=e.substring(2),e=u):(t=e.substring(2,n),e=e.substring(n)||u)}return new p("file",t,e,c,c)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}t.URI=d;const h=i.isWindows?1:void 0;class p extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,n){let i,o=-1;for(let r=0;r<e.length;r++){const s=e.charCodeAt(r);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(i+=encodeURIComponent(e.substring(o,r)),o=-1),void 0!==i&&(i+=e.charAt(r));else{void 0===i&&(i=e.substr(0,r));const t=f[s];void 0!==t?(-1!==o&&(i+=encodeURIComponent(e.substring(o,r)),o=-1),i+=t):-1===o&&(o=r)}}return-1!==o&&(i+=encodeURIComponent(e.substring(o))),void 0!==i?i:e}function m(e){let t;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=f[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function v(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i.isWindows&&(n=n.replace(/\//g,"\\")),n}function y(e,t){const n=t?m:g;let i="",{scheme:o,authority:r,path:s,query:a,fragment:c}=e;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=u,i+=u),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}r=r.toLowerCase(),e=r.lastIndexOf(":"),-1===e?i+=n(r,!1,!0):(i+=n(r.substr(0,e),!1,!0),i+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}i+=n(s,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),c&&(i+="#",i+=t?c:g(c,!1,!1)),i}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}t.uriToFsPath=v;const _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(_)?e.replace(_,e=>b(e)):e}},552:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=r(n(975)),a=s.posix||s,c="/";var u;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==c&&(n=c+n,i=!0);let o=a.resolve(n,...t);return i&&o[0]===c&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(u||(t.Utils=u={}))}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=n(231);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const o=n(552);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),i})(),e.exports=t()},3844:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidPattern=void 0,t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},3876:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DefinitionRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(c.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n),e=>i.handleFailedRequest(c.DefinitionRequest.type,n,e,null)),r=i.middleware;return r.provideDefinition?r.provideDefinition(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=d},3881:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=function(e,t,n,i){const o=e||(e=>c.Uri.parse(e));function r(e){return o(e)}function s(e){const t=new m.ProtocolDiagnostic(S(e.range),e.message,T(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)u.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:r(e.codeDescription.href)}:t.code=e.code;else if(m.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const n=e.code;t.code={value:n.value,target:r(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 i=e[n];t[n]=new c.DiagnosticRelatedInformation(L(i.location),i.message)}return t}(e.relatedInformation)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;const t=[];for(const n of e){const e=a(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function a(e){switch(e){case u.DiagnosticTag.Unnecessary:return c.DiagnosticTag.Unnecessary;case u.DiagnosticTag.Deprecated:return c.DiagnosticTag.Deprecated;default:return}}function w(e){return e?new c.Position(e.line,e.character):void 0}function S(e){return e?new c.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function R(e,t){return d.map(e,e=>new c.Range(e.start.line,e.start.character,e.end.line,e.end.character),t)}function T(e){if(null==e)return c.DiagnosticSeverity.Error;switch(e){case u.DiagnosticSeverity.Error:return c.DiagnosticSeverity.Error;case u.DiagnosticSeverity.Warning:return c.DiagnosticSeverity.Warning;case u.DiagnosticSeverity.Information:return c.DiagnosticSeverity.Information;case u.DiagnosticSeverity.Hint:return c.DiagnosticSeverity.Hint}return c.DiagnosticSeverity.Error}function P(e){if(l.string(e))return e;switch(e.kind){case u.MarkupKind.Markdown:return O(e.value);case u.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function O(e){let o;if(void 0===e||"string"==typeof e)o=new c.MarkdownString(e);else switch(e.kind){case u.MarkupKind.Markdown:o=new c.MarkdownString(e.value);break;case u.MarkupKind.PlainText:o=new c.MarkdownString,o.appendText(e.value);break;default:o=new c.MarkdownString,o.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return o.isTrusted=t,o.supportHtml=n,o.supportThemeIcons=i,o}function k(e){if(e===u.CompletionItemTag.Deprecated)return c.CompletionItemTag.Deprecated}function x(e,t,n,i,o,r,s,a){const d=function(e){if(null==e)return[];const t=[];for(const n of e){const e=k(n);void 0!==e&&t.push(e)}return t}(e.tags),p=function(e){return u.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),f=new h.default(p);e.detail&&(f.detail=e.detail),e.documentation&&(f.documentation=P(e.documentation),f.documentationFormat=l.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(f.filterText=e.filterText);const g=function(e,t,n){const i=e.insertTextFormat??n;if(void 0!==e.textEdit||void 0!==t){const[n,r]=void 0!==e.textEdit?(o=e.textEdit,u.InsertReplaceEdit.is(o)?[{inserting:S(o.insert),replacing:S(o.replace)},o.newText]:[S(o.range),o.newText]):[t,e.textEditText??e.label];return i===u.InsertTextFormat.Snippet?{text:new c.SnippetString(r),range:n,fromEdit:!0}:{text:r,range:n,fromEdit:!0}}return e.insertText?i===u.InsertTextFormat.Snippet?{text:new c.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var o}(e,i,r);if(g&&(f.insertText=g.text,f.range=g.range,f.fromEdit=g.fromEdit),l.number(e.kind)){const[t,n]=(m=e.kind,u.CompletionItemKind.Text<=m&&m<=u.CompletionItemKind.TypeParameter?[m-1,void 0]:[c.CompletionItemKind.Text,m]);f.kind=t,n&&(f.originalItemKind=n)}var m;e.sortText&&(f.sortText=e.sortText),e.additionalTextEdits&&(f.additionalTextEdits=F(e.additionalTextEdits));const v=function(e,t,n){if(n===u.ApplyKind.Merge){if(!t&&!e.commitCharacters)return;const n=new Set;if(t)for(const e of t)n.add(e);if(l.stringArray(e.commitCharacters))for(const t of e.commitCharacters)n.add(t);return Array.from(n)}return void 0!==e.commitCharacters?l.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t}(e,t,n);v&&(f.commitCharacters=v.slice()),e.command&&(f.command=J(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(f.deprecated=e.deprecated,!0===e.deprecated&&d.push(c.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(f.preselect=e.preselect);const y=function(e,t,n){if(n===u.ApplyKind.Merge){const n={...t};return e.data&&Object.entries(e.data).forEach(([e,t])=>{null!=t&&(n[e]=t)}),n}return e.data??t}(e,s,a);void 0!==y&&(f.data=y),d.length>0&&(f.tags=d);const b=e.insertTextMode??o;return void 0!==b&&(f.insertTextMode=b,b===u.InsertTextMode.asIs&&(f.keepWhitespace=!0)),f}function M(e){if(e)return new c.TextEdit(S(e.range),e.newText)}async function q(e,t){if(e)return d.map(e,M,t)}function F(e){if(!e)return;const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=M(e[n]);return t}async function j(e,t){return d.mapAsync(e,E,t)}async function E(e,t){const n=new c.SignatureInformation(e.label);return void 0!==e.documentation&&(n.documentation=P(e.documentation)),void 0!==e.parameters&&(n.parameters=await N(e.parameters,t)),void 0!==e.activeParameter&&(n.activeParameter=e.activeParameter??-1),n}function N(e,t){return d.map(e,I,t)}function I(e){const t=new c.ParameterInformation(e.label);return e.documentation&&(t.documentation=P(e.documentation)),t}function L(e){return e?new c.Location(o(e.uri),S(e.range)):void 0}function A(e){if(!e)return;const t={targetUri:o(e.targetUri),targetRange:S(e.targetRange),originSelectionRange:S(e.originSelectionRange),targetSelectionRange:S(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}async function H(e,t){if(e){if(l.array(e)){if(0===e.length)return[];if(u.LocationLink.is(e[0])){const n=e;return d.map(n,A,t)}{const n=e;return d.map(n,L,t)}}return u.LocationLink.is(e)?[A(e)]:L(e)}}function K(e){const t=new c.DocumentHighlight(S(e.range));return l.number(e.kind)&&(t.kind=W(e.kind)),t}function W(e){switch(e){case u.DocumentHighlightKind.Text:return c.DocumentHighlightKind.Text;case u.DocumentHighlightKind.Read:return c.DocumentHighlightKind.Read;case u.DocumentHighlightKind.Write:return c.DocumentHighlightKind.Write}return c.DocumentHighlightKind.Text}function U(e){return e<=u.SymbolKind.TypeParameter?e-1:c.SymbolKind.Property}function z(e){if(e===u.SymbolTag.Deprecated)return c.SymbolTag.Deprecated}function $(e){if(null==e)return;const t=[];for(const n of e){const e=z(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function B(e){const t=e.data,n=e.location,i=void 0===n.range||void 0!==t?new b.default(e.name,U(e.kind),e.containerName??"",void 0===n.range?o(n.uri):new c.Location(o(e.location.uri),S(n.range)),t):new c.SymbolInformation(e.name,U(e.kind),e.containerName??"",new c.Location(o(e.location.uri),S(n.range)));return G(i,e),i}function V(e){const t=new c.DocumentSymbol(e.name,e.detail||"",U(e.kind),S(e.range),S(e.selectionRange));if(G(t,e),void 0!==e.children&&e.children.length>0){const n=[];for(const t of e.children)n.push(V(t));t.children=n}return t}function G(e,t){e.tags=$(t.tags),t.deprecated&&(e.tags?e.tags.includes(c.SymbolTag.Deprecated)||(e.tags=e.tags.concat(c.SymbolTag.Deprecated)):e.tags=[c.SymbolTag.Deprecated])}function J(e){const t={title:e.title,command:e.command};return e.tooltip&&(t.tooltip=e.tooltip),e.arguments&&(t.arguments=e.arguments),t}const Q=new Map;function X(e){if(null==e)return;let t=Q.get(e);if(t)return t;const n=e.split(".");t=c.CodeActionKind.Empty;for(const e of n)t=t.append(e);return t}async function Z(e,t){if(null==e)return;const n=new g.default(e.title,e.data);return void 0!==e.kind&&(n.kind=X(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]=s(e[n]);return t}(e.diagnostics)),void 0!==e.edit&&(n.edit=await ee(e.edit,t)),void 0!==e.command&&(n.command=J(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),e.tags?.includes(u.CodeActionTag.LLMGenerated)&&(n.isAI=!0),n}function Y(e){if(!e)return;const t=new p.default(S(e.range));return e.command&&(t.command=J(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}async function ee(e,t){if(!e)return;const n=new Map;if(void 0!==e.changeAnnotations){const i=e.changeAnnotations;await d.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 i=e=>void 0===e?void 0:n.get(e),r=new c.WorkspaceEdit;if(e.documentChanges){const n=e.documentChanges;await d.forEach(n,e=>{if(u.CreateFile.is(e))r.createFile(o(e.uri),e.options,i(e.annotationId));else if(u.RenameFile.is(e))r.renameFile(o(e.oldUri),o(e.newUri),e.options,i(e.annotationId));else if(u.DeleteFile.is(e))r.deleteFile(o(e.uri),e.options,i(e.annotationId));else{if(!u.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=o(e.textDocument.uri),n=[];for(const t of e.edits)u.AnnotatedTextEdit.is(t)?n.push([new c.TextEdit(S(t.range),t.newText),i(t.annotationId)]):u.SnippetTextEdit.is(t)?n.push([new c.SnippetTextEdit(S(t.range),new c.SnippetString(t.snippet.value)),i(t.annotationId)]):n.push([new c.TextEdit(S(t.range),t.newText),void 0]);r.set(t,n)}}},t)}else if(e.changes){const n=e.changes;await d.forEach(Object.keys(n),e=>{r.set(o(e),F(n[e]))},t)}return r}function te(e){const t=S(e.range),n=e.target?r(e.target):void 0,i=new f.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 ne(e){return new c.Color(e.red,e.green,e.blue,e.alpha)}function ie(e){return new c.ColorInformation(S(e.range),ne(e.color))}function oe(e){const t=new c.ColorPresentation(e.label);return t.additionalTextEdits=F(e.additionalTextEdits),e.textEdit&&(t.textEdit=M(e.textEdit)),t}function re(e){if(e)switch(e){case u.FoldingRangeKind.Comment:return c.FoldingRangeKind.Comment;case u.FoldingRangeKind.Imports:return c.FoldingRangeKind.Imports;case u.FoldingRangeKind.Region:return c.FoldingRangeKind.Region}}function se(e){return new c.FoldingRange(e.startLine,e.endLine,re(e.kind))}function ae(e){return new c.SelectionRange(S(e.range),e.parent?ae(e.parent):void 0)}function ce(e){return u.InlineValueText.is(e)?new c.InlineValueText(S(e.range),e.text):u.InlineValueVariableLookup.is(e)?new c.InlineValueVariableLookup(S(e.range),e.variableName,e.caseSensitiveLookup):new c.InlineValueEvaluatableExpression(S(e.range),e.expression)}async function ue(e,t){const n="string"==typeof e.label?e.label:await d.map(e.label,le,t),i=new _.default(w(e.position),n);return void 0!==e.kind&&(i.kind=e.kind),void 0!==e.textEdits&&(i.textEdits=await q(e.textEdits,t)),void 0!==e.tooltip&&(i.tooltip=de(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 le(e){const t=new c.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=L(e.location)),void 0!==e.tooltip&&(t.tooltip=de(e.tooltip)),void 0!==e.command&&(t.command=J(e.command)),t}function de(e){return"string"==typeof e?e:O(e)}function he(e){if(null===e)return;const t=new v.default(U(e.kind),e.name,e.detail||"",r(e.uri),S(e.range),S(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=$(e.tags)),t}async function pe(e,t){return new c.CallHierarchyIncomingCall(he(e.from),await R(e.fromRanges,t))}async function fe(e,t){return new c.CallHierarchyOutgoingCall(he(e.to),await R(e.fromRanges,t))}function ge(e){return new c.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function me(e){if(null===e)return;const t=new y.default(U(e.kind),e.name,e.detail||"",r(e.uri),S(e.range),S(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=$(e.tags)),t}function ve(e){if(l.string(e))return e;if(u.RelativePattern.is(e)){if(u.URI.is(e.baseUri))return new c.RelativePattern(r(e.baseUri),e.pattern);if(u.WorkspaceFolder.is(e.baseUri)){const t=c.workspace.getWorkspaceFolder(r(e.baseUri.uri));return void 0!==t?new c.RelativePattern(t,e.pattern):void 0}}}function ye(e){let t,n;t="string"==typeof e.insertText?e.insertText:new c.SnippetString(e.insertText.value),e.command&&(n=J(e.command));const i=new c.InlineCompletionItem(t,S(e.range),n);return e.filterText&&(i.filterText=e.filterText),i}return Q.set(u.CodeActionKind.Empty,c.CodeActionKind.Empty),Q.set(u.CodeActionKind.QuickFix,c.CodeActionKind.QuickFix),Q.set(u.CodeActionKind.Refactor,c.CodeActionKind.Refactor),Q.set(u.CodeActionKind.RefactorExtract,c.CodeActionKind.RefactorExtract),Q.set(u.CodeActionKind.RefactorInline,c.CodeActionKind.RefactorInline),Q.set(u.CodeActionKind.RefactorRewrite,c.CodeActionKind.RefactorRewrite),Q.set(u.CodeActionKind.Source,c.CodeActionKind.Source),Q.set(u.CodeActionKind.SourceOrganizeImports,c.CodeActionKind.SourceOrganizeImports),{asUri:r,asDocumentSelector:function(e){const t=[];for(const n of e)if("string"==typeof n)t.push(n);else if(C.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:ve(n.notebook.pattern),language:n.language})}else C.TextDocumentFilter.is(n)&&t.push({language:n.language,scheme:n.scheme,pattern:ve(n.pattern)});return t},asDiagnostics:async function(e,t){return d.map(e,s,t)},asDiagnostic:s,asRange:S,asRanges:R,asPosition:w,asDiagnosticSeverity:T,asDiagnosticTag:a,asHover:function(e){if(e)return new c.Hover(function(e){if(l.string(e))return O(e);if(D.is(e))return O().appendCodeblock(e.value,e.language);if(Array.isArray(e)){const t=[];for(const n of e){const e=O();D.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}return O(e)}(e.contents),S(e.range))},asCompletionResult:async function(e,t,n){if(!e)return;if(Array.isArray(e))return d.map(e,e=>x(e,t),n);const i=e,{defaultRange:o,commitCharacters:r}=function(e,t){const n=e.itemDefaults?.editRange,i=e.itemDefaults?.commitCharacters??t;return u.Range.is(n)?{defaultRange:S(n),commitCharacters:i}:void 0!==n?{defaultRange:{inserting:S(n.insert),replacing:S(n.replace)},commitCharacters:i}:{defaultRange:void 0,commitCharacters:i}}(i,t),s=await d.map(i.items,e=>x(e,r,i.applyKind?.commitCharacters,o,i.itemDefaults?.insertTextMode,i.itemDefaults?.insertTextFormat,i.itemDefaults?.data,i.applyKind?.data),n);return new c.CompletionList(s,i.isIncomplete)},asCompletionItem:x,asTextEdit:M,asTextEdits:q,asSignatureHelp:async function(e,t){if(!e)return;const n=new c.SignatureHelp;return l.number(e.activeSignature)?n.activeSignature=e.activeSignature:n.activeSignature=0,l.number(e.activeParameter)?n.activeParameter=e.activeParameter:null===e.activeParameter?n.activeParameter=-1:n.activeParameter=0,e.signatures&&(n.signatures=await j(e.signatures,t)),n},asSignatureInformations:j,asSignatureInformation:E,asParameterInformations:N,asParameterInformation:I,asDeclarationResult:async function(e,t){if(e)return H(e,t)},asDefinitionResult:async function(e,t){if(e)return H(e,t)},asLocation:L,asReferences:async function(e,t){if(e)return d.map(e,L,t)},asDocumentHighlights:async function(e,t){if(e)return d.map(e,K,t)},asDocumentHighlight:K,asDocumentHighlightKind:W,asSymbolKind:U,asSymbolTag:z,asSymbolTags:$,asSymbolInformations:async function(e,t){if(e)return d.map(e,B,t)},asSymbolInformation:B,asDocumentSymbols:async function(e,t){if(null!=e)return d.map(e,V,t)},asDocumentSymbol:V,asCommand:J,asCommands:async function(e,t){if(e)return d.map(e,J,t)},asCodeAction:Z,asCodeActionKind:X,asCodeActionKinds:function(e){if(null!=e)return e.map(e=>X(e))},asCodeActionDocumentations:function(e){if(null!=e)return e.map(e=>({kind:X(e.kind),command:J(e.command)}))},asCodeActionResult:function(e,t){return d.mapAsync(e,async e=>u.Command.is(e)?J(e):Z(e,t),t)},asCodeLens:Y,asCodeLenses:async function(e,t){if(e)return d.map(e,Y,t)},asWorkspaceEdit:ee,asDocumentLink:te,asDocumentLinks:async function(e,t){if(e)return d.map(e,te,t)},asFoldingRangeKind:re,asFoldingRange:se,asFoldingRanges:async function(e,t){if(e)return d.map(e,se,t)},asColor:ne,asColorInformation:ie,asColorInformations:async function(e,t){if(e)return d.map(e,ie,t)},asColorPresentation:oe,asColorPresentations:async function(e,t){if(e)return d.map(e,oe,t)},asSelectionRange:ae,asSelectionRanges:async function(e,t){return Array.isArray(e)?d.map(e,ae,t):[]},asInlineValue:ce,asInlineValues:async function(e,t){return Array.isArray(e)?d.map(e,ce,t):[]},asInlayHint:ue,asInlayHints:async function(e,t){if(Array.isArray(e))return d.mapAsync(e,ue,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new c.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:ge,asSemanticTokensEdits:async function(e,t){if(null!=e)return new c.SemanticTokensEdits(e.edits.map(ge),e.resultId)},asCallHierarchyItem:he,asCallHierarchyItems:async function(e,t){if(null!==e)return d.map(e,he,t)},asCallHierarchyIncomingCall:pe,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return d.mapAsync(e,pe,t)},asCallHierarchyOutgoingCall:fe,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return d.mapAsync(e,fe,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new c.LinkedEditingRanges(await R(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:me,asTypeHierarchyItems:async function(e,t){if(null!==e)return d.map(e,me,t)},asGlobPattern:ve,asInlineCompletionResult:async function(e,t){if(!e)return;if(Array.isArray(e))return d.map(e,e=>ye(e),t);const n=e,i=await d.map(n.items,e=>ye(e),t);return new c.InlineCompletionList(i)},asInlineCompletionItem:ye}};const c=s(n(1398)),u=s(n(3434)),l=s(n(1027)),d=s(n(5671)),h=a(n(4752)),p=a(n(1936)),f=a(n(7252)),g=a(n(2946)),m=n(5146),v=a(n(2049)),y=a(n(5965)),b=a(n(1332)),_=a(n(107)),C=n(3434);var D;!function(e){e.is=function(e){const t=e;return t&&l.string(t.language)&&l.string(t.value)}}(D||(D={}))},4092:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.SignatureHelpRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.signatureInformation.noActiveParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>o.sendRequest(c.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then(e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asSignatureHelp(e,i),e=>o.handleFailedRequest(c.SignatureHelpRequest.type,i,e,null)),s=o.middleware;return s.provideSignatureHelp?s.provideSignatureHelp(e,t,i,n,r):r(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 i=e.triggerCharacters||[];return a.languages.registerSignatureHelpProvider(n,t,...i)}{const i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return a.languages.registerSignatureHelpProvider(n,t,i)}}}t.SignatureHelpFeature=d},4124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const i=n(6877),o=n(4970),r=new Set(["!","?","+","*","@"]),s=e=>r.has(e),a="(?!\\.)",c=new Set(["[","."]),u=new Set(["..","."]),l=new Set("().*{}+?[]^$\\!"),d=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),h="[^/]",p=h+"*?",f=h+"+?";class g{type;#e;#t;#n=!1;#i=[];#o;#r;#s;#a=!1;#c;#u;#l=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#s=this.#e===this?[]:this.#e.#s,"!"!==e||this.#e.#a||this.#s.push(this),this.#r=this.#o?this.#o.#i.length:0}get hasMagic(){if(void 0!==this.#t)return this.#t;for(const e of this.#i)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#u=this.#i.map(e=>String(e)).join("")}#d(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;let e;for(this.toString(),this.#a=!0;e=this.#s.pop();){if("!"!==e.type)continue;let t=e,n=t.#o;for(;n;){for(let i=t.#r+1;!n.type&&i<n.#i.length;i++)for(const t of e.#i){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(n.#i[i])}t=n,n=t.#o}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof g&&t.#o===this))throw new Error("invalid part: "+t);this.#i.push(t)}}toJSON(){const e=null===this.type?this.#i.slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...this.#i.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#a&&"!"===this.#o?.type)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(0===this.#r)return!0;const e=this.#o;for(let t=0;t<this.#r;t++){const n=e.#i[t];if(!(n instanceof g&&"!"===n.type))return!1}return!0}isEnd(){if(this.#e===this)return!0;if("!"===this.#o?.type)return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();const e=this.#o?this.#o.#i.length:0;return this.#r===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new g(this.type,e);for(const e of this.#i)t.copyIn(e);return t}static#h(e,t,n,i){let o=!1,r=!1,a=-1,c=!1;if(null===t.type){let u=n,l="";for(;u<e.length;){const n=e.charAt(u++);if(o||"\\"===n)o=!o,l+=n;else if(r)u===a+1?"^"!==n&&"!"!==n||(c=!0):"]"!==n||u===a+2&&c||(r=!1),l+=n;else if("["!==n){if(!i.noext&&s(n)&&"("===e.charAt(u)){t.push(l),l="";const o=new g(n,t);u=g.#h(e,o,u,i),t.push(o);continue}l+=n}else r=!0,a=u,c=!1,l+=n}return t.push(l),u}let u=n+1,l=new g(null,t);const d=[];let h="";for(;u<e.length;){const n=e.charAt(u++);if(o||"\\"===n)o=!o,h+=n;else if(r)u===a+1?"^"!==n&&"!"!==n||(c=!0):"]"!==n||u===a+2&&c||(r=!1),h+=n;else if("["!==n){if(s(n)&&"("===e.charAt(u)){l.push(h),h="";const t=new g(n,l);l.push(t),u=g.#h(e,t,u,i);continue}if("|"!==n){if(")"===n)return""===h&&0===t.#i.length&&(t.#l=!0),l.push(h),h="",t.push(...d,l),u;h+=n}else l.push(h),h="",d.push(l),l=new g(null,t)}else r=!0,a=u,c=!1,h+=n}return t.type=null,t.#t=void 0,t.#i=[e.substring(n-1)],u}static fromGlob(e,t={}){const n=new g(null,void 0,t);return g.#h(e,n,0,t),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString(),[t,n,i,o]=this.toRegExpSource();if(!(i||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const r=(this.#c.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${t}$`,r),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){const t=e??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){const n=this.isStart()&&this.isEnd(),i=this.#i.map(t=>{const[i,o,r,s]="string"==typeof t?g.#p(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||r,this.#n=this.#n||s,i}).join("");let r="";if(this.isStart()&&"string"==typeof this.#i[0]&&(1!==this.#i.length||!u.has(this.#i[0]))){const n=c,o=t&&n.has(i.charAt(0))||i.startsWith("\\.")&&n.has(i.charAt(2))||i.startsWith("\\.\\.")&&n.has(i.charAt(4)),s=!t&&!e&&n.has(i.charAt(0));r=o?"(?!(?:^|/)\\.\\.?(?:$|/))":s?a:""}let s="";return this.isEnd()&&this.#e.#a&&"!"===this.#o?.type&&(s="(?:$|\\/)"),[r+i+s,(0,o.unescape)(i),this.#t=!!this.#t,this.#n]}const n="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let r=this.#f(t);if(this.isStart()&&this.isEnd()&&!r&&"!"!==this.type){const e=this.toString();return this.#i=[e],this.type=null,this.#t=void 0,[e,(0,o.unescape)(this.toString()),!1,!1]}let s=!n||e||t?"":this.#f(!0);s===r&&(s=""),s&&(r=`(?:${r})(?:${s})*?`);let l="";return l="!"===this.type&&this.#l?(this.isStart()&&!t?a:"")+f:i+r+("!"===this.type?"))"+(!this.isStart()||t||e?"":a)+p+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`),[l,(0,o.unescape)(r),this.#t=!!this.#t,this.#n]}#f(e){return this.#i.map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[n,i,o,r]=t.toRegExpSource(e);return this.#n=this.#n||r,n}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}static#p(e,t,n=!1){let r=!1,s="",a=!1;for(let o=0;o<e.length;o++){const c=e.charAt(o);if(r)r=!1,s+=(l.has(c)?"\\":"")+c;else if("\\"!==c){if("["===c){const[n,r,c,u]=(0,i.parseClass)(e,o);if(c){s+=n,a=a||r,o+=c-1,t=t||u;continue}}"*"!==c?"?"!==c?s+=d(c):(s+=h,t=!0):(s+=n&&"*"===e?f:p,t=!0)}else o===e.length-1?s+="\\\\":r=!0}return[s,(0,o.unescape)(e),!!t,a]}}t.AST=g},4201:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const a=s(n(1398)),c=s(n(3420)),u=s(n(3434)),l=s(n(8820));function d(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function h(e,t,n){e[t]=n}class p{_client;_event;_registrationType;_clientCapability;_serverCapability;_listener;_filters;constructor(e,t,n,i,o){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=o,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=d(d(e,"workspace"),"fileOperations");h(t,"dynamicRegistration",!0),h(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:l.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 c.Minimatch(e.pattern.glob,p.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 p.getFileType(e)}async filter(e,t){const n=await Promise.all(e.files.map(async e=>{const n=t(e),i=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(i)){if(void 0===t.kind)return!0;const e=await this.getFileType(n);if(void 0===e)return this._client.info(`Unable to determine file type for ${n.toString()}. Treating as a match.`),!0;if(e===a.FileType.File&&t.kind===u.FileOperationPatternKind.file||e===a.FileType.Directory&&t.kind===u.FileOperationPatternKind.folder)return!0}else if(t.kind===u.FileOperationPatternKind.folder&&await p.getFileType(n)===a.FileType.Directory&&t.matcher.match(`${i}/`))return!0;return!1})),i=e.files.filter((e,t)=>n[t]);return{...e,files:i}}static async getFileType(e){try{return(await a.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){const t={dot:!0};return!0===e?.ignoreCase&&(t.nocase=!0),t}}class f extends p{_notificationType;_accessUri;_createParams;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._notificationType=n,this._accessUri=r,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 g extends f{_willListener;_fsPathFileTypes=new Map;async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const n=await p.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 f{constructor(e){super(e,a.workspace.onDidCreateFiles,u.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 g{constructor(e){super(e,a.workspace.onDidRenameFiles,u.DidRenameFilesNotification.type,"didRename","didRename",e=>e.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=a.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 g{constructor(e){super(e,a.workspace.onDidDeleteFiles,u.DidDeleteFilesNotification.type,"didDelete","didDelete",e=>e,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=a.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 m extends p{_requestType;_accessUri;_createParams;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._requestType=n,this._accessUri=r,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 m{constructor(e){super(e,a.workspace.onWillCreateFiles,u.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 m{constructor(e){super(e,a.workspace.onWillRenameFiles,u.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 m{constructor(e){super(e,a.workspace.onWillDeleteFiles,u.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)}}},4231:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.HoverRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[c.MarkupKind.Markdown,c.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideHover:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(c.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asHover(e),e=>i.handleFailedRequest(c.HoverRequest.type,n,e,null)),r=i.middleware;return r.provideHover?r.provideHover(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=d},4267:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.ConfigurationFeature=void 0,t.toJSONObject=h;const a=n(1398),c=n(3434),u=s(n(1027)),l=s(n(8820)),d=n(9810);function h(e){if(e){if(Array.isArray(e))return e.map(h);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=h(e[n]));return t}}return e}t.ConfigurationFeature=class{_client;constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){const e=this._client;e.onRequest(c.ConfigurationRequest.type,(t,n)=>{const i=e=>{const t=[];for(const n of e.items){const 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},o=e.middleware.workspace;return o&&o.configuration?o.configuration(t,n,i):i(t)})}getConfiguration(e,t){let n=null;if(t){const i=t.lastIndexOf(".");if(-1===i)n=h(a.workspace.getConfiguration(void 0,e).get(t));else{const o=a.workspace.getConfiguration(t.substr(0,i),e);o&&(n=h(o.get(t.substr(i+1))))}}else{const t=a.workspace.getConfiguration(void 0,e);n={};for(const e of Object.keys(t))t.has(e)&&(n[e]=h(t.get(e)))}return void 0===n&&(n=null),n}clear(){}},t.SyncConfigurationFeature=class{_client;isCleared;_listeners;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 c.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,d.ensure)((0,d.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;const e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:l.generateUuid(),registerOptions:{section:e}})}register(e){const t=a.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){const 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=u.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(c.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(c.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}),o=this._client.middleware.workspace?.didChangeConfiguration;(o?o(n,i):i(n)).catch(e=>{this._client.error(`Sending notification ${c.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}const n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){const r=e[o],s=r.indexOf(".");let c=null;if(c=s>=0?a.workspace.getConfiguration(r.substr(0,s),n).get(r.substr(s+1)):a.workspace.getConfiguration(void 0,n).get(r),c){const n=e[o].split(".");t(i,n)[n[n.length-1]]=h(c)}}return i}}},4292:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const a=s(n(1398)),c=s(n(3434)),u=s(n(8820)),l=s(n(1027)),d=n(3563);function h(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var p,f,g,m,v;!function(e){let t;!function(t){function n(e,t){return e.map(e=>o(e,t))}function i(e){return r(new Set,e)}function o(e,t){const n=c.NotebookCell.create(function(e){switch(e){case a.NotebookCellKind.Markup:return c.NotebookCellKind.Markup;case a.NotebookCellKind.Code:return c.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(n.metadata=i(e.metadata)),void 0!==e.executionSummary&&l.number(e.executionSummary.executionOrder)&&l.boolean(e.executionSummary.success)&&(n.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),n}function r(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(r(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 o of n){const n=t[o];if(null!==n&&"object"==typeof n||Array.isArray(n))i[o]=r(e,n);else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");i[o]=n}}return i}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,o){const r=c.NotebookDocument.create(o.asUri(e.uri),e.notebookType,e.version,n(t,o));return Object.keys(e.metadata).length>0&&(r.metadata=i(e.metadata)),r},t.asNotebookCells=n,t.asMetadata=i,t.asNotebookCell=o,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 o=Object.create(null),r=t.cells;r.structure&&(o.structure={array:{start:r.structure.array.start,deleteCount:r.structure.array.deleteCount,cells:void 0!==r.structure.array.cells?r.structure.array.cells.map(t=>e.c2p.asNotebookCell(t,n)):void 0},didOpen:void 0!==r.structure.didOpen?r.structure.didOpen.map(e=>n.asOpenTextDocumentParams(e.document).textDocument):void 0,didClose:void 0!==r.structure.didClose?r.structure.didClose.map(e=>n.asCloseTextDocumentParams(e.document).textDocument):void 0}),void 0!==r.data&&(o.data=r.data.map(t=>e.c2p.asNotebookCell(t,n))),void 0!==r.textContent&&(o.textContent=r.textContent.map(t=>e.c2p.asTextContentChange(t,n))),Object.keys(o).length>0&&(i.cells=o)}return i}}(t=e.c2p||(e.c2p={}))}(p||(p={})),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 o=Array.isArray(e),r=Array.isArray(t);if(o!==r)return!1;if(o&&r){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),o=Object.keys(t);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!n(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!n(e[r],t[r]))return!1}return!0}return!1}function i(e){return null!==e&&"object"==typeof e}e.computeDiff=function(e,n,i){const o=e.length,r=n.length;let s=0;for(;s<r&&s<o&&t(e[s],n[s],i);)s++;if(s<r&&s<o){let a=o-1,c=r-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<r?{start:s,deleteCount:0,cells:n.slice(s)}:s<o?{start:s,deleteCount:o-s}:void 0},e.isObjectLiteral=i}(f||(f={})),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;return!(void 0!==e.scheme&&"*"!==e.scheme&&n.scheme!==e.scheme||void 0!==e.pattern&&!(0,d.matchGlobPattern)(e.pattern,n))}}(g||(g={})),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)??"*",o="string"==typeof e.notebook?void 0:e.notebook?.scheme,r="string"==typeof e.notebook?void 0:e.notebook?.pattern;if(void 0!==e.cells)for(const s of e.cells)i.push(t(n,o,r,s.language));else i.push(t(n,o,r,void 0))}return i}}(m||(m={})),function(e){e.create=function(e){return{cells:e,uris:new Set(e.map(e=>e.document.uri.toString()))}}}(v||(v={}));class y{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,t,n,i,o,r){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(m.asDocumentSelector(t)),this.onChangeNotificationSent=n,this.onOpenNotificationSent=i,this.onCloseNotificationSent=o,this.onSaveNotificationSent=r,a.workspace.onDidOpenNotebookDocument(e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)},void 0,this.disposables);for(const e of a.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);a.workspace.onDidChangeNotebookDocument(e=>this.didChangeNotebookDocument(e),void 0,this.disposables),!0===this.options.save&&a.workspace.onDidSaveNotebookDocument(e=>this.didSave(e),void 0,this.disposables),a.workspace.onDidCloseNotebookDocument(e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())},void 0,this.disposables)}getState(){for(const e of a.workspace.notebookDocuments)if(void 0!==this.getMatchingCellsConsideringSyncInfo(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){if(a.languages.match(this.selector,e)>0)return!0;const t=e.uri.toString();for(const e of this.notebookSyncInfo.values())if(e.uris.has(t))return!0;return!1}didOpenNotebookCellTextDocument(e,t){if(0===a.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const n=this.getSyncInfo(e),i=this.cellMatches(e,t);if(void 0!==n){const o=n.uris.has(t.document.uri.toString());if(i&&o||!i&&!o)return;if(i){const i=this.mergeCells(e,n,[t]);if(void 0!==i){const t=this.asNotebookDocumentChangeEvent(e,void 0,n,i);void 0!==t&&this.doSendChange(t,i).catch(()=>{})}}}else i&&this.doSendOpen(e,[t]).catch(()=>{})}didChangeNotebookCellTextDocument(e,t,n){if(0===a.languages.match(this.selector,n.document))return;const i=this.getSyncInfo(e);void 0!==i&&i.uris.has(t.document.uri.toString())&&this.doSendChange({notebook:e,cells:{textContent:[n]}},i.cells).catch(()=>{})}didCloseNotebookCellTextDocument(e,t){const n=this.getSyncInfo(e);if(void 0===n)return;const i=t.document.uri,o=n.cells.findIndex(e=>e.document.uri.toString()===i.toString());if(-1!==o)if(0===o&&1===n.cells.length)this.doSendClose(e,n.cells).catch(()=>{});else{const t=n.cells.slice(),i=t.splice(o,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:o,deleteCount:1},didClose:i}}},t).catch(()=>{})}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t,n=this.getSyncInfo(e)){if(void 0!==n)if(void 0===t&&(t=n.cells.slice()),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=this.getMatchingCells(e)))return;this.doSendOpen(e,t).catch(()=>{})}}didChangeNotebookDocument(e){const t=e.notebook,n=this.getSyncInfo(t);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.getMatchingCellsFromEvent(t,n,e);if(void 0===i)return void this.didClose(t,n);const o=this.asNotebookDocumentChangeEvent(e.notebook,e,n,i);void 0!==o&&this.doSendChange(o,i).catch(()=>{})}}didSave(e){void 0!==this.getSyncInfo(e)&&this.doSendSave(e).catch(()=>{})}didClose(e,t=this.getSyncInfo(e)){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){if(void 0!==this.getSyncInfo(e))throw new Error(`Notebook document ${e.uri.toString()} is already open`);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=t.map(e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document));try{await this.client.sendNotification(c.DidOpenNotebookDocumentNotification.type,{notebookDocument:p.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),cellTextDocuments:n}),this.onOpenNotificationSent.fire(e)}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),v.create(t)),void 0!==i?.didOpen?i.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){const t=this.getMatchingCellsFromSyncInfo(e.notebook);if(void 0===t)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,t)}async doSendChange(e,t){const n=async e=>{try{await this.client.sendNotification(c.DidChangeNotebookDocumentNotification.type,{notebookDocument:p.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:p.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(e)}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(),v.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(c.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}}),this.onSaveNotificationSent.fire(e)}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){const t=this.getMatchingCellsFromSyncInfo(e);if(void 0===t)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,t)}async doSendClose(e,t){const n=async(e,t)=>{try{await this.client.sendNotification(c.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map(e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document))}),this.onCloseNotificationSent.fire(e)}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)}getSynchronizedCells(e){const t=this.getSyncInfo(e);return t?.cells}asNotebookDocumentChangeEvent(e,t,n,i){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const o={notebook:e};let r;if(void 0!==t?.metadata&&(o.metadata=p.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];r=new Set(i.map(e=>e.document.uri.toString()));for(const n of t.cellChanges)!r.has(n.cell.document.uri.toString())||void 0===n.executionSummary&&void 0===n.metadata||e.push(n.cell);e.length>0&&(o.cells=o.cells??{},o.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,r=f.computeDiff(e,t,!1);let s,a;if(void 0!==r){s=void 0===r.cells?new Map:new Map(r.cells.map(e=>[e.document.uri.toString(),e])),a=0===r.deleteCount?new Map:new Map(e.slice(r.start,r.start+r.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));o.cells=o.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)}o.cells.structure={array:r,didOpen:t,didClose:n}}}return Object.keys(o).length>1?o: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||g.matchNotebook(n.notebook,e)){const i=this.filterCells(e,t,n.cells);return 0===i.length?void 0:i}}getMatchingCellsFromEvent(e,t,n){if(void 0===this.options.notebookSelector)return;let i,o;for(const t of this.options.notebookSelector)if(void 0===t.notebook||g.matchNotebook(t.notebook,e)){i=t;break}if(void 0===i)return;if(!(void 0!==n.cellChanges&&0!==n.cellChanges.length||void 0!==n.contentChanges&&0!==n.contentChanges.length))return t.cells;if(void 0!==n.cellChanges&&n.cellChanges.length>0){const r=n.cellChanges.map(e=>e.cell),s=this.filterCells(e,r,i.cells);if(s.length!==r.length){o=new Set(t.uris);for(const e of r)o.delete(e.document.uri.toString());for(const e of s)o.add(e.document.uri.toString())}}if(void 0!==n.contentChanges&&n.contentChanges.length>0){void 0===o&&(o=new Set(t.uris));for(const t of n.contentChanges){for(const e of t.removedCells)o.delete(e.document.uri.toString());const n=this.filterCells(e,new Array(...t.addedCells),i.cells);for(const e of n)o.add(e.document.uri.toString())}}if(void 0===o)return t.cells;const r=[],s=e.getCells();for(const e of s)o.has(e.document.uri.toString())&&r.push(e);return r}getMatchingCellsFromSyncInfo(e){const t=this.getSyncInfo(e);return void 0!==t?t.cells:void 0}getMatchingCellsConsideringSyncInfo(e){const t=this.getSyncInfo(e);return void 0!==t?t.cells:this.getMatchingCells(e)}mergeCells(e,t,n){const i=[],o=new Set(t.uris);for(const e of n)o.add(e.document.uri.toString());for(const t of e.getCells())o.has(t.document.uri.toString())&&i.push(t);return 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}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}}class b{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=c.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new a.EventEmitter,this._onOpenNotificationSent=new a.EventEmitter,this._onCloseNotificationSent=new a.EventEmitter,this._onSaveNotificationSent=new a.EventEmitter,a.workspace.onDidOpenTextDocument(e=>{if(e.uri.scheme!==b.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof y&&e.didOpenNotebookCellTextDocument(t,n)}),a.workspace.onDidChangeTextDocument(e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==b.CellScheme)return;const[n,i]=this.findNotebookDocumentAndCell(t);if(void 0!==n&&void 0!==i)for(const t of this.registrations.values())t instanceof y&&t.didChangeNotebookCellTextDocument(n,i,e)}),a.workspace.onDidCloseTextDocument(e=>{if(e.uri.scheme!==b.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof y&&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}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){const t=h(h(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(m.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const n=t.id??u.generateUuid();this.register({id:n,registerOptions:t})}register(e){const t=new y(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);void 0!==t&&(this.registrations.delete(e),t.dispose())}clear(){for(const e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new a.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new a.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new a.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new a.EventEmitter}handles(e){if(e.uri.scheme!==b.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&a.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 a.workspace.notebookDocuments)for(const n of e.getCells())if(n.document.uri.toString()===t)return[e,n];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=b},4341:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=void 0;const i=n(7096);var o,r;!function(e){e.method="workspace/textDocumentContent",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")}(o||(t.TextDocumentContentRequest=o={})),function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TextDocumentContentRefreshRequest=r={}))},4346:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function i(e){return{uri:t(e.uri)}}function o(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function r(e){switch(e){case c.TextDocumentSaveReason.Manual:return u.TextDocumentSaveReason.Manual;case c.TextDocumentSaveReason.AfterDelay:return u.TextDocumentSaveReason.AfterDelay;case c.TextDocumentSaveReason.FocusOut:return u.TextDocumentSaveReason.FocusOut}return u.TextDocumentSaveReason.Manual}function s(e){switch(e){case c.CompletionTriggerKind.TriggerCharacter:return u.CompletionTriggerKind.TriggerCharacter;case c.CompletionTriggerKind.TriggerForIncompleteCompletions:return u.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return u.CompletionTriggerKind.Invoked}}function a(e){switch(e){case c.SignatureHelpTriggerKind.Invoke:return u.SignatureHelpTriggerKind.Invoked;case c.SignatureHelpTriggerKind.TriggerCharacter:return u.SignatureHelpTriggerKind.TriggerCharacter;case c.SignatureHelpTriggerKind.ContentChange:return u.SignatureHelpTriggerKind.ContentChange}}function D(e){return{label:e.label}}function w(e){return{label:e.label,parameters:(t=e.parameters,t.map(D))};var t}function S(e){return{line:e.line,character:e.character}}function R(e){return null==e?e:{line:e.line>u.uinteger.MAX_VALUE?u.uinteger.MAX_VALUE:e.line,character:e.character>u.uinteger.MAX_VALUE?u.uinteger.MAX_VALUE:e.character}}function T(e){return null==e?e:{start:R(e.start),end:R(e.end)}}function P(e){return null==e?e:u.Location.create(n(e.uri),T(e.range))}function O(e){switch(e){case c.DiagnosticSeverity.Error:return u.DiagnosticSeverity.Error;case c.DiagnosticSeverity.Warning:return u.DiagnosticSeverity.Warning;case c.DiagnosticSeverity.Information:return u.DiagnosticSeverity.Information;case c.DiagnosticSeverity.Hint:return u.DiagnosticSeverity.Hint}}function k(e){switch(e){case c.DiagnosticTag.Unnecessary:return u.DiagnosticTag.Unnecessary;case c.DiagnosticTag.Deprecated:return u.DiagnosticTag.Deprecated;default:return}}function x(e){return{message:e.message,location:P(e.location)}}function M(e){const t=u.Diagnostic.create(T(e.range),e.message),i=e instanceof m.ProtocolDiagnostic?e:void 0;void 0!==i&&void 0!==i.data&&(t.data=i.data);const o=function(e){if(null!=e)return l.number(e)||l.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return m.DiagnosticCode.is(o)?void 0!==i&&i.hasDiagnosticCode?t.code=o:(t.code=o.value,t.codeDescription={href:o.target}):t.code=o,l.number(e.severity)&&(t.severity=O(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;const t=[];for(const n of e){const e=k(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(x)),e.source&&(t.source=e.source),t}function q(e,t){return null==e?e:d.map(e,M,t)}function F(e){return null==e?e:e.map(M)}function j(e){if(e===c.CompletionItemTag.Deprecated)return u.CompletionItemTag.Deprecated}function E(e){return{range:T(e.range),newText:e.newText}}function N(e){return null==e?e:e.map(E)}function I(e){return e<=c.SymbolKind.TypeParameter?e+1:u.SymbolKind.Property}function L(e){return e}function A(e){return e.map(L)}function H(e){switch(e){case c.CodeActionTriggerKind.Invoke:return u.CodeActionTriggerKind.Invoked;case c.CodeActionTriggerKind.Automatic:return u.CodeActionTriggerKind.Automatic;default:return}}function K(e){if(null!=e)return e.value}function W(e){return{triggerKind:U(e.triggerKind),selectedCompletionInfo:z(e.selectedCompletionInfo)}}function U(e){switch(e){case c.InlineCompletionTriggerKind.Invoke:return u.InlineCompletionTriggerKind.Invoked;case c.InlineCompletionTriggerKind.Automatic:return u.InlineCompletionTriggerKind.Automatic}}function z(e){if(null!=e)return{range:T(e.range),text:e.text}}function $(e){const t=u.Command.create(e.title,e.command);return e.tooltip&&(t.tooltip=e.tooltip),e.arguments&&(t.arguments=e.arguments),t}function B(e){const t=u.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=P(e.location)),void 0!==e.command&&(t.command=$(e.command)),void 0!==e.tooltip&&(t.tooltip=V(e.tooltip)),t}function V(e){return"string"==typeof e?e:{kind:u.MarkupKind.Markdown,value:e.value}}return{asUri:n,asTextDocumentIdentifier:i,asTextDocumentItem:o,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:o(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 o=i;return{textDocument:{uri:t(n),version:o},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:i(e)}},asSaveTextDocumentParams:function(e,t=!1){const n={textDocument:i(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:i(e.document),reason:r(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:i(e),position:S(t)}},asCompletionParams:function(e,t,n){return{textDocument:i(e),position:S(t),context:{triggerKind:s(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:i(e),position:S(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:a(n.triggerKind),activeSignatureHelp:(o=n.activeSignatureHelp,void 0===o?o:{signatures:(r=o.signatures,r.map(w)),activeSignature:o.activeSignature,activeParameter:o.activeParameter})}};var o,r},asWorkerPosition:S,asRange:T,asRanges:function(e){return e.map(T)},asPosition:R,asPositions:function(e,t){return d.map(e,R,t)},asPositionsSync:function(e){return e.map(R)},asLocation:P,asDiagnosticSeverity:O,asDiagnosticTag:k,asDiagnostic:M,asDiagnostics:q,asDiagnosticsSync:F,asCompletionItem:function(e,t=!1){let n,i;l.string(e.label)?n=e.label:(n=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(i={detail:e.label.detail,description:e.label.description}));const o={label:n};void 0!==i&&(o.labelDetails=i);const r=e instanceof h.default?e:void 0;var s,a;e.detail&&(o.detail=e.detail),e.documentation&&(r&&"$string"!==r.documentationFormat?o.documentation=function(e,t){switch(e){case"$string":return t;case u.MarkupKind.PlainText:return{kind:e,value:t};case u.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(r.documentationFormat,e.documentation):o.documentation=e.documentation),e.filterText&&(o.filterText=e.filterText),function(e,t){let n,i,o=u.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,i=t.textEdit.range):t.insertText instanceof c.SnippetString?(o=u.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(i=t.range),e.insertTextFormat=o,t.fromEdit&&void 0!==n&&void 0!==i?e.textEdit=function(e,t){return C.is(t)?u.InsertReplaceEdit.create(e,T(t.inserting),T(t.replacing)):{newText:e,range:T(t)}}(n,i):e.insertText=n}(o,e),l.number(e.kind)&&(o.kind=(s=e.kind,void 0!==(a=r&&r.originalItemKind)?a:s+1)),e.sortText&&(o.sortText=e.sortText),e.additionalTextEdits&&(o.additionalTextEdits=N(e.additionalTextEdits)),e.commitCharacters&&(o.commitCharacters=e.commitCharacters.slice()),e.command&&(o.command=$(e.command)),!0!==e.preselect&&!1!==e.preselect||(o.preselect=e.preselect);const d=function(e){if(void 0===e)return e;const t=[];for(const n of e){const e=j(n);void 0!==e&&t.push(e)}return t}(e.tags);if(r){if(void 0!==r.data&&(o.data=r.data),!0===r.deprecated||!1===r.deprecated){if(!0===r.deprecated&&void 0!==d&&d.length>0){const e=d.indexOf(c.CompletionItemTag.Deprecated);-1!==e&&d.splice(e,1)}o.deprecated=r.deprecated}void 0!==r.insertTextMode&&(o.insertTextMode=r.insertTextMode)}return void 0!==d&&d.length>0&&(o.tags=d),void 0===o.insertTextMode&&!0===e.keepWhitespace&&(o.insertTextMode=u.InsertTextMode.adjustIndentation),o},asTextEdit:E,asSymbolKind:I,asSymbolTag:L,asSymbolTags:A,asReferenceParams:function(e,t,n){return{textDocument:i(e),position:S(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:async function(e,t){const n=u.CodeAction.create(e.title);if(e instanceof g.default&&void 0!==e.data&&(n.data=e.data),void 0!==e.kind&&(n.kind=K(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=await q(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=$(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),e.isAI&&(n.tags??=[],n.tags.push(u.CodeActionTag.LLMGenerated)),n},asCodeActionSync:function(e){const t=u.CodeAction.create(e.title);if(e instanceof g.default&&void 0!==e.data&&(t.data=e.data),void 0!==e.kind&&(t.kind=K(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=F(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=$(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),e.isAI&&(t.tags??=[],t.tags.push(u.CodeActionTag.LLMGenerated)),t},asCodeActionContext:async function(e,t){if(null==e)return e;let n;return e.only&&l.string(e.only.value)&&(n=[e.only.value]),u.CodeActionContext.create(await q(e.diagnostics,t),n,H(e.triggerKind))},asCodeActionContextSync:function(e){if(null==e)return e;let t;return e.only&&l.string(e.only.value)&&(t=[e.only.value]),u.CodeActionContext.create(F(e.diagnostics),t,H(e.triggerKind))},asInlineValueContext:function(e){return u.InlineValueContext.create(e.frameId,T(e.stoppedLocation))},asCommand:$,asCodeLens:function(e){const t=u.CodeLens.create(T(e.range));return e.command&&(t.command=$(e.command)),e instanceof p.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:i(e)}},asCodeLensParams:function(e){return{textDocument:i(e)}},asDocumentLink:function(e){const t=u.DocumentLink.create(T(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);const i=e instanceof f.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:i(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:I(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=A(e.tags)),e instanceof v.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:I(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=A(e.tags)),e instanceof y.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(B),n=u.InlayHint.create(R(e.position),t);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=N(e.textEdits)),void 0!==e.tooltip&&(n.tooltip=V(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),e instanceof _.default&&void 0!==e.data&&(n.data=e.data),n},asWorkspaceSymbol:function(e){const n=e instanceof b.default?{name:e.name,kind:I(e.kind),location:e.hasRange?P(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:I(e.kind),location:P(e.location)};return void 0!==e.tags&&(n.tags=A(e.tags)),""!==e.containerName&&(n.containerName=e.containerName),n},asInlineCompletionParams:function(e,t,n){return{textDocument:i(e),position:R(t),context:W(n)}},asInlineCompletionContext:W}};const c=s(n(1398)),u=s(n(3434)),l=s(n(1027)),d=s(n(5671)),h=a(n(4752)),p=a(n(1936)),f=a(n(7252)),g=a(n(2946)),m=n(5146),v=a(n(2049)),y=a(n(5965)),b=a(n(1332)),_=a(n(107));var C;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(C||(C={}))},4384:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.ReferencesRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideReferences:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>o.sendRequest(c.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),i).then(e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asReferences(e,i),e=>o.handleFailedRequest(c.ReferencesRequest.type,i,e,null)),s=o.middleware;return s.provideReferences?s.provideReferences(e,t,n,i,r):r(e,t,n,i)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=d},4437:(e,t,n)=>{"use strict";var i,o,r,s,a,c,u,l,d,h,p,f,g,m,v,y,b,_,C,D,w,S,R,T,P,O,k,x,M,q,F,j,E,N,I,L,A,H,K,W,U,z,$,B,V,G,J,Q,X,Z,Y,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,pe,fe,ge,me,ve,ye,be,_e,Ce,De,we,Se,Re,Te,Pe,Oe,ke,xe;n.r(t),n.d(t,{AnnotatedTextEdit:()=>R,ApplyKind:()=>z,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>ue,CodeActionContext:()=>ae,CodeActionKind:()=>re,CodeActionTag:()=>ce,CodeActionTriggerKind:()=>se,CodeDescription:()=>b,CodeLens:()=>le,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>p,Command:()=>C,CompletionItem:()=>B,CompletionItemKind:()=>A,CompletionItemLabelDetails:()=>$,CompletionItemTag:()=>K,CompletionList:()=>V,CreateFile:()=>P,DeleteFile:()=>k,Diagnostic:()=>_,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>v,DiagnosticTag:()=>y,DocumentHighlight:()=>Y,DocumentHighlightKind:()=>Z,DocumentLink:()=>he,DocumentSymbol:()=>oe,DocumentUri:()=>i,EOL:()=>je,FoldingRange:()=>g,FoldingRangeKind:()=>f,FormattingOptions:()=>de,Hover:()=>J,InlayHint:()=>we,InlayHintKind:()=>Ce,InlayHintLabelPart:()=>De,InlineCompletionContext:()=>ke,InlineCompletionItem:()=>Re,InlineCompletionList:()=>Te,InlineCompletionTriggerKind:()=>Pe,InlineValueContext:()=>_e,InlineValueEvaluatableExpression:()=>be,InlineValueText:()=>ve,InlineValueVariableLookup:()=>ye,InsertReplaceEdit:()=>W,InsertTextFormat:()=>H,InsertTextMode:()=>U,LanguageKind:()=>E,Location:()=>u,LocationLink:()=>l,MarkedString:()=>G,MarkupContent:()=>L,MarkupKind:()=>I,OptionalVersionedTextDocumentIdentifier:()=>j,ParameterInformation:()=>Q,Position:()=>a,Range:()=>c,RenameFile:()=>O,SelectedCompletionInfo:()=>Oe,SelectionRange:()=>pe,SemanticTokenModifiers:()=>ge,SemanticTokenTypes:()=>fe,SemanticTokens:()=>me,SignatureInformation:()=>X,SnippetTextEdit:()=>M,StringValue:()=>Se,SymbolInformation:()=>ne,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>Ee,TextDocumentEdit:()=>T,TextDocumentIdentifier:()=>q,TextDocumentItem:()=>N,TextEdit:()=>D,URI:()=>o,VersionedTextDocumentIdentifier:()=>F,WorkspaceChange:()=>Fe,WorkspaceEdit:()=>x,WorkspaceFolder:()=>xe,WorkspaceSymbol:()=>ie,integer:()=>r,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),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}}(r||(r={})),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){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.line)&&Ne.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,i){if(Ne.uinteger(e)&&Ne.uinteger(t)&&Ne.uinteger(n)&&Ne.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){const t=e;return Ne.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){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&(Ne.string(t.uri)||Ne.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){const t=e;return Ne.objectLiteral(t)&&c.is(t.targetRange)&&Ne.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Ne.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 Ne.objectLiteral(t)&&Ne.numberRange(t.red,0,1)&&Ne.numberRange(t.green,0,1)&&Ne.numberRange(t.blue,0,1)&&Ne.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 Ne.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 Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.undefined(t.textEdit)||D.is(t))&&(Ne.undefined(t.additionalTextEdits)||Ne.typedArray(t.additionalTextEdits,D.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,n,i,o,r){const s={startLine:e,endLine:t};return Ne.defined(n)&&(s.startCharacter=n),Ne.defined(i)&&(s.endCharacter=i),Ne.defined(o)&&(s.kind=o),Ne.defined(r)&&(s.collapsedText=r),s},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.startLine)&&Ne.uinteger(t.startLine)&&(Ne.undefined(t.startCharacter)||Ne.uinteger(t.startCharacter))&&(Ne.undefined(t.endCharacter)||Ne.uinteger(t.endCharacter))&&(Ne.undefined(t.kind)||Ne.string(t.kind))}}(g||(g={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){const t=e;return Ne.defined(t)&&u.is(t.location)&&Ne.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 Ne.objectLiteral(t)&&Ne.string(t.href)}}(b||(b={})),function(e){e.create=function(e,t,n,i,o,r){const s={range:e,message:t};return Ne.defined(n)&&(s.severity=n),Ne.defined(i)&&(s.code=i),Ne.defined(o)&&(s.source=o),Ne.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t;const n=e;return Ne.defined(n)&&c.is(n.range)&&Ne.string(n.message)&&(Ne.number(n.severity)||Ne.undefined(n.severity))&&(Ne.integer(n.code)||Ne.string(n.code)||Ne.undefined(n.code))&&(Ne.undefined(n.codeDescription)||Ne.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ne.string(n.source)||Ne.undefined(n.source))&&(Ne.undefined(n.relatedInformation)||Ne.typedArray(n.relatedInformation,m.is))}}(_||(_={})),function(e){e.create=function(e,t,...n){const i={title:e,command:t};return Ne.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.title)&&(void 0===t.tooltip||Ne.string(t.tooltip))&&Ne.string(t.command)}}(C||(C={})),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 Ne.objectLiteral(t)&&Ne.string(t.newText)&&c.is(t.range)}}(D||(D={})),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 Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ne.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){const t=e;return Ne.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 D.is(t)&&(w.is(t.annotationId)||S.is(t.annotationId))}}(R||(R={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return Ne.defined(t)&&j.is(t.textDocument)&&Array.isArray(t.edits)}}(T||(T={})),function(e){e.create=function(e,t,n){const 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){const t=e;return t&&"create"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n,i){const o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==i&&(o.annotationId=i),o},e.is=function(e){const t=e;return t&&"rename"===t.kind&&Ne.string(t.oldUri)&&Ne.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(O||(O={})),function(e){e.create=function(e,t,n){const 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){const t=e;return t&&"delete"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ne.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ne.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(k||(k={})),function(e){e.is=function(e){const t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Ne.string(e.kind)?P.is(e)||O.is(e)||k.is(e):T.is(e)))}}(x||(x={}));class Me{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let i,o;if(void 0===n?i=D.insert(e,t):S.is(n)?(o=n,i=R.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=R.insert(e,t,o)),this.edits.push(i),void 0!==o)return o}replace(e,t,n){let i,o;if(void 0===n?i=D.replace(e,t):S.is(n)?(o=n,i=R.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=R.replace(e,t,o)),this.edits.push(i),void 0!==o)return o}delete(e,t){let n,i;if(void 0===t?n=D.del(e):S.is(t)?(i=t,n=R.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=R.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.")}}!function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&Se.isSnippet(t.snippet)&&(void 0===t.annotationId||w.is(t.annotationId)||S.is(t.annotationId))}}(M||(M={}));class qe{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 Fe{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new qe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(T.is(e)){const t=new Me(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const n=new Me(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(j.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 Me(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){const n=[];this._workspaceEdit.changes[e]=n,t=new Me(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new qe,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,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=P.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=P.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}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 o,r,s;if(w.is(n)||S.is(n)?o=n:i=n,void 0===o?r=O.create(e,t,i):(s=S.is(o)?o:this._changeAnnotations.manage(o),r=O.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(r),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,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=k.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=k.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)}}(q||(q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.integer(t.version)}}(F||(F={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&(null===t.version||Ne.integer(t.version))}}(j||(j={})),function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"}(E||(E={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.string(t.languageId)&&Ne.integer(t.version)&&Ne.string(t.text)}}(N||(N={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(I||(I={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(e)&&I.is(t.kind)&&Ne.string(t.value)}}(L||(L={})),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}(A||(A={})),function(e){e.PlainText=1,e.Snippet=2}(H||(H={})),function(e){e.Deprecated=1}(K||(K={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ne.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.Replace=1,e.Merge=2}(z||(z={})),function(e){e.is=function(e){const t=e;return t&&(Ne.string(t.detail)||void 0===t.detail)&&(Ne.string(t.description)||void 0===t.description)}}($||($={})),function(e){e.create=function(e){return{label:e}}}(B||(B={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(V||(V={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ne.string(t)||Ne.objectLiteral(t)&&Ne.string(t.language)&&Ne.string(t.value)}}(G||(G={})),function(e){e.is=function(e){const t=e;return!!t&&Ne.objectLiteral(t)&&(L.is(t.contents)||G.is(t.contents)||Ne.typedArray(t.contents,G.is))&&(void 0===e.range||c.is(e.range))}}(J||(J={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Q||(Q={})),function(e){e.create=function(e,t,...n){const i={label:e};return Ne.defined(t)&&(i.documentation=t),Ne.defined(n)?i.parameters=n:i.parameters=[],i}}(X||(X={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Z||(Z={})),function(e){e.create=function(e,t){const n={range:e};return Ne.number(t)&&(n.kind=t),n}}(Y||(Y={})),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}(ee||(ee={})),function(e){e.Deprecated=1}(te||(te={})),function(e){e.create=function(e,t,n,i,o){const r={name:e,kind:t,location:{uri:i,range:n}};return o&&(r.containerName=o),r}}(ne||(ne={})),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}}}}(ie||(ie={})),function(e){e.create=function(e,t,n,i,o,r){const s={name:e,detail:t,kind:n,range:i,selectionRange:o};return void 0!==r&&(s.children=r),s},e.is=function(e){const t=e;return t&&Ne.string(t.name)&&Ne.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Ne.string(t.detail))&&(void 0===t.deprecated||Ne.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(oe||(oe={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"}(re||(re={})),function(e){e.Invoked=1,e.Automatic=2}(se||(se={})),function(e){e.create=function(e,t,n){const i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.typedArray(t.diagnostics,_.is)&&(void 0===t.only||Ne.typedArray(t.only,Ne.string))&&(void 0===t.triggerKind||t.triggerKind===se.Invoked||t.triggerKind===se.Automatic)}}(ae||(ae={})),function(e){e.LLMGenerated=1,e.is=function(t){return Ne.defined(t)&&t===e.LLMGenerated}}(ce||(ce={})),function(e){e.create=function(e,t,n){const i={title:e};let o=!0;return"string"==typeof t?(o=!1,i.kind=t):C.is(t)?i.command=t:i.edit=t,o&&void 0!==n&&(i.kind=n),i},e.is=function(e){const t=e;return t&&Ne.string(t.title)&&(void 0===t.diagnostics||Ne.typedArray(t.diagnostics,_.is))&&(void 0===t.kind||Ne.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||C.is(t.command))&&(void 0===t.isPreferred||Ne.boolean(t.isPreferred))&&(void 0===t.edit||x.is(t.edit))&&(void 0===t.tags||Ne.typedArray(t.tags,ce.is))}}(ue||(ue={})),function(e){e.create=function(e,t){const n={range:e};return Ne.defined(t)&&(n.data=t),n},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.command)||C.is(t.command))}}(le||(le={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.uinteger(t.tabSize)&&Ne.boolean(t.insertSpaces)}}(de||(de={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.target)||Ne.string(t.target))}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){const n=t;return Ne.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(pe||(pe={})),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",e.label="label"}(fe||(fe={})),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"}(ge||(ge={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(me||(me={})),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)&&Ne.string(t.text)}}(ve||(ve={})),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)&&Ne.boolean(t.caseSensitiveLookup)&&(Ne.string(t.variableName)||void 0===t.variableName)}}(ye||(ye={})),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)&&(Ne.string(t.expression)||void 0===t.expression)}}(be||(be={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(e.stoppedLocation)}}(_e||(_e={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Ce||(Ce={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.tooltip||Ne.string(t.tooltip)||L.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||C.is(t.command))}}(De||(De={})),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 Ne.objectLiteral(t)&&a.is(t.position)&&(Ne.string(t.label)||Ne.typedArray(t.label,De.is))&&(void 0===t.kind||Ce.is(t.kind))&&void 0===t.textEdits||Ne.typedArray(t.textEdits,D.is)&&(void 0===t.tooltip||Ne.string(t.tooltip)||L.is(t.tooltip))&&(void 0===t.paddingLeft||Ne.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ne.boolean(t.paddingRight))}}(we||(we={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}},e.isSnippet=function(e){const t=e;return Ne.objectLiteral(t)&&"snippet"===t.kind&&Ne.string(t.value)}}(Se||(Se={})),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}}}(Te||(Te={})),function(e){e.Invoked=1,e.Automatic=2}(Pe||(Pe={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Oe||(Oe={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(ke||(ke={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&o.is(t.uri)&&Ne.string(t.name)}}(xe||(xe={}));const je=["\n","\r\n","\r"];var Ee,Ne;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,o=e.slice(0,i),r=e.slice(i);t(o,n),t(r,n);let s=0,a=0,c=0;for(;s<o.length&&a<r.length;){const t=n(o[s],r[a]);e[c++]=t<=0?o[s++]:r[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<r.length;)e[c++]=r[a++];return e}e.create=function(e,t,n,i){return new Ie(e,t,n,i)},e.is=function(e){const t=e;return!!(Ne.defined(t)&&Ne.string(t.uri)&&(Ne.undefined(t.languageId)||Ne.string(t.languageId))&&Ne.uinteger(t.lineCount)&&Ne.func(t.getText)&&Ne.func(t.positionAt)&&Ne.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText();const o=t(n,(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=i.length;for(let t=o.length-1;t>=0;t--){const n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=r))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),r=s}return i}}(Ee||(Ee={}));class Ie{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){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){const e=[],t=this._content;let n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);const o=t.charAt(i);n="\r"===o||"\n"===o,"\r"===o&&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);const t=this.getLineOffsets();let n=0,i=t.length;if(0===i)return a.create(0,e);for(;n<i;){const o=Math.floor((n+i)/2);t[o]>e?i=o:n=o+1}const o=n-1;return a.create(o,e-t[o])}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],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)}}(Ne||(Ne={}))},4486:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(7096);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.declaration","declarationProvider")}(o||(t.DeclarationRequest=o={}))},4735:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const a=n(9765),c=s(n(7786)),u=n(7096);var l,d,h,p,f;!function(e){e.is=function(e){const t=e;return t&&c.boolean(t.retriggerRequest)}}(l||(t.DiagnosticServerCancellationData=l={})),function(e){e.Full="full",e.Unchanged="unchanged"}(d||(t.DocumentDiagnosticReportKind=d={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=u.CM.create("textDocument.diagnostic","diagnosticProvider")}(h||(t.DocumentDiagnosticRequest=h={})),function(e){e.method="workspace/diagnostic",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=u.CM.create("workspace.diagnostics","diagnosticProvider.workspaceDiagnostics")}(p||(t.WorkspaceDiagnosticRequest=p={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=u.MessageDirection.serverToClient,e.type=new u.ProtocolRequestType0(e.method),e.capabilities=u.CM.create("workspace.diagnostics.refreshSupport",void 0)}(f||(t.DiagnosticRefreshRequest=f={}))},4752:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CompletionItem{data;fromEdit;documentationFormat;originalItemKind;deprecated;insertTextMode;constructor(e){super(e)}}t.default=c},4782:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const c=a(n(9042)),u=s(n(6357)),l=n(6712);var d;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:l.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:l.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||u.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(d||(t.CancellationToken=d={}));const h=Object.freeze(function(e,t){const n=(0,c.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}});class p{_isCancelled=!1;_emitter;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?h:(this._emitter||(this._emitter=new l.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{_token;get token(){return this._token||(this._token=new p),this._token}cancel(){this._token?this._token.cancel():this._token=d.Cancelled}dispose(){this._token?this._token instanceof p&&this._token.dispose():this._token=d.None}}},4940:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const i=n(7096);var o,r,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.inlayHint","inlayHintProvider")}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")}(r||(t.InlayHintResolveRequest=r={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method),e.capabilities=i.CM.create("workspace.inlayHint.refreshSupport",void 0)}(s||(t.InlayHintRefreshRequest=s={}))},4970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=void 0,t.unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},5122:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentFeature=void 0;const a=s(n(1398)),c=n(3434),u=n(9810),l=s(n(8820));t.TextDocumentContentFeature=class{_client;_registrations=new Map;constructor(e){this._client=e}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:c.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return c.TextDocumentContentRequest.type}getProviders(){const e=[];for(const t of this._registrations.values())e.push(...t.providers);return e}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"workspace"),"textDocumentContent").dynamicRegistration=!0}initialize(e){const t=this._client;if(t.onRequest(c.TextDocumentContentRefreshRequest.type,async e=>{const n=t.protocol2CodeConverter.asUri(e.uri);for(const e of this._registrations.values())for(const t of e.providers)t.scheme===n.scheme&&t.onDidChangeEmitter.fire(n)}),!e?.workspace?.textDocumentContent)return;const n=e.workspace.textDocumentContent,i=c.StaticRegistrationOptions.hasId(n)?n.id:l.generateUuid();this.register({id:i,registerOptions:n})}register(e){const t=[],n=[];for(const i of e.registerOptions.schemes){const[e,o]=this.registerTextDocumentContentProvider(i);t.push(o),n.push(e)}this._registrations.set(e.id,{disposable:a.Disposable.from(...n),providers:t})}registerTextDocumentContentProvider(e){const t=new a.EventEmitter,n={onDidChange:t.event,provideTextDocumentContent:(e,t)=>{const n=this._client,i=(e,t)=>{const i={uri:n.code2ProtocolConverter.asUri(e)};return n.sendRequest(c.TextDocumentContentRequest.type,i,t).then(e=>t.isCancellationRequested?null:e.text,e=>n.handleFailedRequest(c.TextDocumentContentRequest.type,t,e,null))},o=n.middleware;return o.provideTextDocumentContent?o.provideTextDocumentContent(e,t,i):i(e,t)}};return[a.workspace.registerTextDocumentContentProvider(e,n),{scheme:e,onDidChangeEmitter:t,provider:n}]}unregister(e){const t=this._registrations.get(e);void 0!==t&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}}},5140:(e,t)=>{"use strict";var n;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}(n||(t.Touch=n={}));class i{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){const t=this._map.get(e);return t?t.previous?.value:void 0}after(e){const t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=n.None){const i=this._map.get(e);if(i)return t!==n.None&&this.touch(i,t),i.value}set(e,t,i=n.None){let o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),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}[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===n.First||t===n.Last)if(t===n.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===n.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=i,t.LRUCache=class extends i{_limit;_ratio;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=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5146:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const a=s(n(1398)),c=s(n(1027));var u;!function(e){e.is=function(e){const t=e;return null!=t&&(c.number(t.value)||c.string(t.value))&&c.string(t.target)}}(u||(t.DiagnosticCode=u={}));class l extends a.Diagnostic{data;hasDiagnosticCode;constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=l},5261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0,t.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},5429:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.UriList=void 0;const a=s(n(1398));class c{entries;static from(e){return new c((t=function(e){return function(e){return e.split("\r\n")}(e).filter(e=>!e.startsWith("#")).map(e=>e.trim())}(e).map(e=>{try{return{uri:a.Uri.parse(e),str:e}}catch{return}}),t.filter(e=>!!e)));var t}constructor(e){this.entries=e}}t.UriList=c},5584:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const i=n(4782);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.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,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class r{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{token;constructor(e){this.token=new r(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{kind="request";createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new i.CancellationTokenSource:new s(t)}}},5671:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=t.Delayer=void 0,t.setTestMode=function(){o=!0},t.clearTestMode=function(){o=!1},t.map=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);function c(n){a.start();for(let i=n;i<e.length;i++)if(s[i]=t(e[i]),a.shouldYield())return o?.yieldCallback&&o.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(()=>{void 0!==n&&n.isCancellationRequested?e(-1):e(c(u))})});return s},t.mapAsync=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);async function c(i){a.start();for(let r=i;r<e.length;r++)if(s[r]=await t(e[r],n),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),r+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(()=>{void 0!==n&&n.isCancellationRequested?e(-1):e(c(u))})});return s},t.forEach=async function(e,t,n,o){if(0===e.length)return;const s=new r(o?.yieldAfter);function a(n){s.start();for(let i=n;i<e.length;i++)if(t(e[i]),s.shouldYield())return o?.yieldCallback&&o.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(()=>{void 0!==n&&n.isCancellationRequested?e(-1):e(a(c))})})};const i=n(3434);t.Delayer=class{defaultDelay;timeout;completionPromise;onSuccess;task;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;const 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();const 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{_capacity;_active;_waiting;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 o=!1;class r{yieldAfter;startTime;counter;total;counterInterval;constructor(e=15){this.yieldAfter=!0===o?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}}},5679:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const a=n(1398),c=n(3434),u=s(n(1027));t.ProgressPart=class{_client;_token;_infinite;_reported;_lspProgressDisposable;_progress;_cancellationToken;_tokenDisposable;_resolve;_reject;constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(c.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&&a.window.withProgress({location:a.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(c.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((e,t)=>{this._resolve=e,this._reject=t})})}report(e){if(this._infinite&&u.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(u.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}}},5908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(7096);var o,r;!function(e){e.method="textDocument/documentColor",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.colorProvider","colorProvider")}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.colorProvider","colorProvider")}(r||(t.ColorPresentationRequest=r={}))},5923:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(9765),o=n(7096);var r,s,a;!function(e){e.type=new i.ProgressType,e.is=function(t){return t===e.type}}(r||(t.WorkDoneProgress=r={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method),e.capabilities=o.CM.create("window.workDoneProgress",void 0)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},5965:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.TypeHierarchyItem{data;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=c},6272:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0,t.arrayDiff=d;const a=s(n(8820)),c=n(1398),u=n(3434);function l(e,t){if(null!=e)return e[t]}function d(e,t){return e.filter(e=>t.indexOf(e)<0)}t.WorkspaceFoldersFeature=class{_client;_listeners;_initialFolders;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 u.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=c.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(u.WorkspaceFoldersRequest.type,e=>{const n=()=>{const e=c.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=l(l(l(e,"workspace"),"workspaceFolders"),"changeNotifications");let i;"string"==typeof n?i=n:!0===n&&(i=a.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const n=d(this._initialFolders,e),i=d(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 ${u.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)})}doSendEvent(e,t){const n={event:{added:e.map(e=>this.asProtocol(e)),removed:t.map(e=>this.asProtocol(e))}};return this._client.sendNotification(u.DidChangeWorkspaceFoldersNotification.type,n)}register(e){const t=e.id,n=this._client,i=c.workspace.onDidChangeWorkspaceFolders(e=>{const 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 ${u.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)})});this._listeners.set(t,i),this.sendInitialEvent(c.workspace.workspaceFolders)}unregister(e){const t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}clear(){for(const 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}}}},6284:(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(7096);var o,r,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(o||(t.FileOperationPatternKind=o={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")}(r||(t.WillCreateFilesRequest=r={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.capabilities=i.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.capabilities=i.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.capabilities=i.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")}(l||(t.WillDeleteFilesRequest=l={}))},6297:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(7096);var o,r,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.CallHierarchyIncomingCallsRequest=r={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},6357:(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.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))}},6576:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);t.FileSystemWatcherFeature=class{_client;_notifyFileEvent;_watchers;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 o.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,r.ensure)((0,r.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 r=!0,s=!0,a=!0;void 0!==n.kind&&null!==n.kind&&(r=0!==(n.kind&o.WatchKind.Create),s=0!==(n.kind&o.WatchKind.Change),a=0!==(n.kind&o.WatchKind.Delete));const c=i.workspace.createFileSystemWatcher(e,!r,!s,!a);this.hookListeners(c,r,s,a,t),t.push(c)}this._watchers.set(e.id,t)}registerRaw(e,t){const n=[];for(const e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,r){t&&e.onDidCreate(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Created}),null,r),n&&e.onDidChange(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Changed}),null,r),i&&e.onDidDelete(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Deleted}),null,r)}unregister(e){const t=this._watchers.get(e);if(t){this._watchers.delete(e);for(const e of t)e.dispose()}}clear(){this._watchers.forEach(e=>{for(const t of e)t.dispose()}),this._watchers.clear()}}},6685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileType=t.FsReadDirRequest=t.FsStatRequest=t.FsContentRequest=void 0,t.serveFileSystemRequests=function(e,t){e.onRequest(r.type,e=>{const n=i.Uri.parse(e.uri);return"file"===n.scheme&&t.fs?t.fs.getContent(e.uri):i.workspace.fs.readFile(n).then(n=>new t.TextDecoder(e.encoding).decode(n))}),e.onRequest(a.type,e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fs?t.fs.readDirectory(e):i.workspace.fs.readDirectory(n)}),e.onRequest(s.type,e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fs?t.fs.stat(e):i.workspace.fs.stat(n)})};const i=n(1398),o=n(2685);var r,s,a,c;!function(e){e.type=new o.RequestType("fs/content")}(r||(t.FsContentRequest=r={})),function(e){e.type=new o.RequestType("fs/stat")}(s||(t.FsStatRequest=s={})),function(e){e.type=new o.RequestType("fs/readDir")}(a||(t.FsReadDirRequest=a={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(c||(t.FileType=c={}))},6712:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const o=i(n(9042));var r;!function(e){const t={dispose(){}};e.None=function(){return t}}(r||(t.Event=r={}));class s{_callbacks;_contexts;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,o=this._callbacks.length;i<o;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),i=this._contexts.slice(0);for(let r=0,s=n.length;r<s;r++)try{t.push(n[r].apply(i[r],e))}catch(e){(0,o.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class a{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new s),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=a._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=a},6811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.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,r={onDidChangeInlayHints:n.event,provideInlayHints:(e,t,n)=>{const i=this._client,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};try{const e=await i.sendRequest(o.InlayHintRequest.type,r,n);return n.isCancellationRequested?null:i.protocol2CodeConverter.asInlayHints(e,n)}catch(e){return i.handleFailedRequest(o.InlayHintRequest.type,n,e,null)}},s=i.middleware;return s.provideInlayHints?s.provideInlayHints(e,t,n,r):r(e,t,n)}};return r.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(o.InlayHintResolveRequest.type,n.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const r=n.protocol2CodeConverter.asInlayHint(i,t);return t.isCancellationRequested?null:r}catch(e){return n.handleFailedRequest(o.InlayHintResolveRequest.type,t,e,null)}},r=n.middleware;return r.resolveInlayHint?r.resolveInlayHint(e,t,i):i(e,t)}:void 0,[this.registerProvider(t,r),{provider:r,onDidChangeInlayHints:n}]}registerProvider(e,t){return i.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=s},6877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseClass=void 0;const n={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},i=e=>e.replace(/[[\]\\-]/g,"\\$&"),o=e=>e.join("");t.parseClass=(e,t)=>{const r=t;if("["!==e.charAt(r))throw new Error("not in a brace expression");const s=[],a=[];let c=r+1,u=!1,l=!1,d=!1,h=!1,p=r,f="";e:for(;c<e.length;){const t=e.charAt(c);if("!"!==t&&"^"!==t||c!==r+1){if("]"===t&&u&&!d){p=c+1;break}if(u=!0,"\\"!==t||d){if("["===t&&!d)for(const[t,[i,o,u]]of Object.entries(n))if(e.startsWith(t,c)){if(f)return["$.",!1,e.length-r,!0];c+=t.length,u?a.push(i):s.push(i),l=l||o;continue e}d=!1,f?(t>f?s.push(i(f)+"-"+i(t)):t===f&&s.push(i(t)),f="",c++):e.startsWith("-]",c+1)?(s.push(i(t+"-")),c+=2):e.startsWith("-",c+1)?(f=t,c+=2):(s.push(i(t)),c++)}else d=!0,c++}else h=!0,c++}if(p<c)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-r,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!h){return[(g=2===s[0].length?s[0].slice(-1):s[0],g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,p-r,!1]}var g;const m="["+(h?"^":"")+o(s)+"]",v="["+(h?"":"^")+o(a)+"]";return[s.length&&a.length?"("+m+"|"+v+")":s.length?m:v,l,p-r,!0]}},6948:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),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.GlobPattern=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.RegularExpressionEngineKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,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=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=void 0,t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=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=t.MonikerRequest=t.MonikerKind=void 0;const a=n(7096),c=n(4437),u=s(n(7786)),l=n(2434);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return l.ImplementationRequest}});const d=n(1121);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return d.TypeDefinitionRequest}});const h=n(3219);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return h.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return h.DidChangeWorkspaceFoldersNotification}});const p=n(9488);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return p.ConfigurationRequest}});const f=n(5908);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return f.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return f.ColorPresentationRequest}});const g=n(8958);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return g.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return g.FoldingRangeRefreshRequest}});const m=n(4486);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return m.DeclarationRequest}});const v=n(7267);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return v.SelectionRangeRequest}});const y=n(5923);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return y.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return y.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return y.WorkDoneProgressCancelNotification}});const b=n(6297);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return b.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return b.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.CallHierarchyPrepareRequest}});const _=n(3562);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return _.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return _.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return _.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return _.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return _.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return _.SemanticTokensRegistrationType}});const C=n(9248);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return C.ShowDocumentRequest}});const D=n(9744);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return D.LinkedEditingRangeRequest}});const w=n(6284);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return w.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return w.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return w.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return w.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return w.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return w.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return w.WillDeleteFilesRequest}});const S=n(2795);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return S.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return S.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return S.MonikerRequest}});const R=n(7553);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 T=n(744);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return T.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return T.InlineValueRefreshRequest}});const P=n(4940);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return P.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return P.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return P.InlayHintRefreshRequest}});const O=n(4735);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return O.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return O.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return O.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return O.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return O.DiagnosticRefreshRequest}});const k=n(3633);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return k.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return k.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return k.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return k.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return k.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return k.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidCloseNotebookDocumentNotification}});const x=n(8575);Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return x.InlineCompletionRequest}});const M=n(4341);var q,F,j,E,N,I,L,A,H,K,W,U,z,$,B,V,G,J,Q,X,Z,Y,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,pe,fe,ge,me,ve,ye,be,_e,Ce,De,we,Se,Re,Te,Pe,Oe,ke,xe,Me,qe,Fe,je,Ee,Ne,Ie,Le,Ae,He,Ke,We,Ue,ze;Object.defineProperty(t,"TextDocumentContentRequest",{enumerable:!0,get:function(){return M.TextDocumentContentRequest}}),Object.defineProperty(t,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return M.TextDocumentContentRefreshRequest}}),function(e){e.is=function(e){const t=e;return u.string(t)||u.string(t.language)||u.string(t.scheme)||fe.is(t.pattern)}}(q||(t.TextDocumentFilter=q={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(u.string(t.notebookType)||u.string(t.scheme)||u.string(t.pattern))}}(F||(t.NotebookDocumentFilter=F={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(u.string(t.notebook)||F.is(t.notebook))&&(void 0===t.language||u.string(t.language))}}(j||(t.NotebookCellTextDocumentFilter=j={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!u.string(t)&&!q.is(t)&&!j.is(t))return!1;return!0}}(E||(t.DocumentSelector=E={})),function(e){e.method="client/registerCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(N||(t.RegistrationRequest=N={})),function(e){e.method="client/unregisterCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(I||(t.UnregistrationRequest=I={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(L||(t.ResourceOperationKind=L={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(A||(t.FailureHandlingKind=A={})),function(e){e.ES2020="ES2020"}(H||(t.RegularExpressionEngineKind=H={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(K||(t.PositionEncodingKind=K={})),function(e){e.hasId=function(e){const t=e;return t&&u.string(t.id)&&t.id.length>0}}(W||(t.StaticRegistrationOptions=W={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||E.is(t.documentSelector))}}(U||(t.TextDocumentRegistrationOptions=U={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(void 0===t.workDoneProgress||u.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&u.boolean(t.workDoneProgress)}}(z||(t.WorkDoneProgressOptions=z={})),function(e){e.method="initialize",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}($||(t.InitializeRequest=$={})),function(e){e.unknownProtocolVersion=1}(B||(t.InitializeErrorCodes=B={})),function(e){e.method="initialized",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(V||(t.InitializedNotification=V={})),function(e){e.method="shutdown",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType0(e.method)}(G||(t.ShutdownRequest=G={})),function(e){e.method="exit",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType0(e.method)}(J||(t.ExitNotification=J={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeConfiguration",void 0)}(Q||(t.DidChangeConfigurationNotification=Q={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(X||(t.MessageType=X={})),function(e){e.method="window/showMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Z||(t.ShowMessageNotification=Z={})),function(e){e.method="window/showMessageRequest",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Y||(t.ShowMessageRequest=Y={})),function(e){e.method="window/logMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(ee||(t.LogMessageNotification=ee={})),function(e){e.method="telemetry/event",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(te||(t.TelemetryEventNotification=te={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(ne||(t.TextDocumentSyncKind=ne={})),function(e){e.method="textDocument/didOpen",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(ie||(t.DidOpenTextDocumentNotification=ie={})),function(e){e.isIncremental=function(e){const 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){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(oe||(t.TextDocumentContentChangeEvent=oe={})),function(e){e.method="textDocument/didChange",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync")}(re||(t.DidChangeTextDocumentNotification=re={})),function(e){e.method="textDocument/didClose",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(se||(t.DidCloseTextDocumentNotification=se={})),function(e){e.method="textDocument/didSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")}(ae||(t.DidSaveTextDocumentNotification=ae={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ce||(t.TextDocumentSaveReason=ce={})),function(e){e.method="textDocument/willSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")}(ue||(t.WillSaveTextDocumentNotification=ue={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")}(le||(t.WillSaveTextDocumentWaitUntilRequest=le={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeWatchedFiles",void 0)}(de||(t.DidChangeWatchedFilesNotification=de={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(he||(t.FileChangeType=he={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(c.URI.is(t.baseUri)||c.WorkspaceFolder.is(t.baseUri))&&u.string(t.pattern)}}(pe||(t.RelativePattern=pe={})),function(e){e.is=function(e){const t=e;return u.string(t)||pe.is(t)}}(fe||(t.GlobPattern=fe={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ge||(t.WatchKind=ge={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.publishDiagnostics",void 0)}(me||(t.PublishDiagnosticsNotification=me={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ve||(t.CompletionTriggerKind=ve={})),function(e){e.method="textDocument/completion",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion","completionProvider")}(ye||(t.CompletionRequest=ye={})),function(e){e.method="completionItem/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")}(be||(t.CompletionResolveRequest=be={})),function(e){e.method="textDocument/hover",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.hover","hoverProvider")}(_e||(t.HoverRequest=_e={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(Ce||(t.SignatureHelpTriggerKind=Ce={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.signatureHelp","signatureHelpProvider")}(De||(t.SignatureHelpRequest=De={})),function(e){e.method="textDocument/definition",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.definition","definitionProvider")}(we||(t.DefinitionRequest=we={})),function(e){e.method="textDocument/references",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.references","referencesProvider")}(Se||(t.ReferencesRequest=Se={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentHighlight","documentHighlightProvider")}(Re||(t.DocumentHighlightRequest=Re={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentSymbol","documentSymbolProvider")}(Te||(t.DocumentSymbolRequest=Te={})),function(e){e.method="textDocument/codeAction",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction","codeActionProvider")}(Pe||(t.CodeActionRequest=Pe={})),function(e){e.method="codeAction/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")}(Oe||(t.CodeActionResolveRequest=Oe={})),function(e){e.method="workspace/symbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol","workspaceSymbolProvider")}(ke||(t.WorkspaceSymbolRequest=ke={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")}(xe||(t.WorkspaceSymbolResolveRequest=xe={})),function(e){e.method="textDocument/codeLens",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens","codeLensProvider")}(Me||(t.CodeLensRequest=Me={})),function(e){e.method="codeLens/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")}(qe||(t.CodeLensResolveRequest=qe={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType0(e.method),e.capabilities=a.CM.create("workspace.codeLens",void 0)}(Fe||(t.CodeLensRefreshRequest=Fe={})),function(e){e.method="textDocument/documentLink",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider")}(je||(t.DocumentLinkRequest=je={})),function(e){e.method="documentLink/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")}(Ee||(t.DocumentLinkResolveRequest=Ee={})),function(e){e.method="textDocument/formatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.formatting","documentFormattingProvider")}(Ne||(t.DocumentFormattingRequest=Ne={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")}(Ie||(t.DocumentRangeFormattingRequest=Ie={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")}(Le||(t.DocumentRangesFormattingRequest=Le={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")}(Ae||(t.DocumentOnTypeFormattingRequest=Ae={})),function(e){e.Identifier=1}(He||(t.PrepareSupportDefaultBehavior=He={})),function(e){e.method="textDocument/rename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename","renameProvider")}(Ke||(t.RenameRequest=Ke={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")}(We||(t.PrepareRenameRequest=We={})),function(e){e.method="workspace/executeCommand",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.executeCommand","executeCommandProvider")}(Ue||(t.ExecuteCommandRequest=Ue={})),function(e){e.method="workspace/applyEdit",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType("workspace/applyEdit"),e.capabilities=a.CM.create("workspace.applyEdit",void 0)}(ze||(t.ApplyWorkspaceEditRequest=ze={}))},7034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const i=n(1398),o=n(3434),r=n(8820),s=n(3563),a=n(9810);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,p;!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",e.onFocus="onFocus"}(l||(t.DiagnosticPullMode=l={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(d||(d={})),function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(h||(h={})),function(e){e.asKey=function(e){return e instanceof i.Uri?e.toString():e.uri.toString()}}(p||(p={}));class f{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){const o=e===h.document?this.documentPullStates:this.workspacePullStates,[r,s,a]=t instanceof i.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version];let c=o.get(r);return void 0===c&&(c={document:s,pulledVersion:a,resultId:void 0},o.set(r,c)),c}update(e,t,n,o){const r=e===h.document?this.documentPullStates:this.workspacePullStates,[s,a,c,u]=t instanceof i.Uri?[t.toString(),t,n,o]:[t.uri.toString(),t.uri,t.version,n];let l=r.get(s);void 0===l?(l={document:a,pulledVersion:c,resultId:u},r.set(s,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,t){const n=p.asKey(t);(e===h.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){const n=p.asKey(t);return(e===h.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){const n=p.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 g{isDisposed;client;tabs;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new i.EventEmitter,this.provider=this.createProvider(),this.diagnostics=i.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new f,this.workspaceErrorCounter=0}knows(e,t){const n=t instanceof i.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 i.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 i.Uri,r=n?e:e.uri,s=r.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 i.CancellationTokenSource;let c,p;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&&(p={state:d.outDated,document:e}),!(void 0===p&&t instanceof i.CancellationError))throw t;p={state:d.reschedule,document:e}}if(p=p??this.openRequests.get(s),void 0===p)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),void this.diagnostics.delete(r);if(this.openRequests.delete(s),!this.tabs.isVisible(e))return void this.documentStates.unTrack(h.document,e);if(p.state===d.outDated)return;void 0!==c&&(c.kind===u.DocumentDiagnosticReportKind.full&&this.diagnostics.set(r,c.items),l.pulledVersion=t,l.resultId=c.resultId),p.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 i.Uri?e:e.uri,n=t.toString(),o=this.openRequests.get(n);this.options.workspaceDiagnostics?(void 0!==o?this.openRequests.set(n,{state:d.reschedule,document:e}):this.pull(e,()=>{this.forget(h.document,e)}),this.forget(h.workspace,e)):(void 0!==o&&(o.state===d.active&&o.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 i.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 r=(e,t,n)=>{const r={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof i.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(o.DocumentDiagnosticRequest.type,r,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:[]},!0,!0)):{kind:u.DocumentDiagnosticReportKind.full,items:[]}},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(e,t,n,r):r(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},s=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,n)=>{const a=(0,r.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:s(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 o={items:[]};for(const t of e.items)o.items.push(await i(t));return c.dispose(),n(o),{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,n)}),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 m{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,t){this.client=e,this.diagnosticRequestor=t,this.documents=new o.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=p.asKey(e);this.documents.has(t)||(this.documents.set(t,e,o.Touch.Last),this.lastDocumentToPull=e)}remove(e){const t=p.asKey(e);if(this.documents.delete(t),0!==this.documents.size){if(t===this.lastDocumentToPullKey()){const e=this.documents.before(t);void 0===e?this.stop():this.lastDocumentToPull=e}}else this.stop()}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){!0!==this.isDisposed&&(0!==this.documents.size?void 0!==this.lastDocumentToPull&&void 0===this.timeoutHandle&&(this.timeoutHandle=(0,o.RAL)().timer.setTimeout(()=>{const e=this.documents.first;if(void 0===e)return;const t=p.asKey(e);this.diagnosticRequestor.pullAsync(e).catch(e=>{this.client.error(`Document pull failed for text document ${t}`,e,!1)}).finally(()=>{this.timeoutHandle=void 0,this.documents.set(t,e,o.Touch.Last),t!==this.lastDocumentToPullKey()&&this.runLoop()})},500)):this.stop())}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return void 0!==this.lastDocumentToPull?p.asKey(this.lastDocumentToPull):void 0}}class v{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,t,n){const r=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),a=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),c=[],u=(e,t)=>!("string"==typeof e||void 0!==e.language&&"*"!==e.language||void 0!==e.scheme&&"*"!==e.scheme&&e.scheme!==t.scheme||void 0!==e.pattern&&!(0,s.matchGlobPattern)(e.pattern,t)),d=e=>e instanceof i.Uri?(e=>{const t=n.documentSelector;if(void 0!==r.match)return r.match(t,e);for(const n of t)if(o.TextDocumentFilter.is(n)&&u(n,e))return!0;return!1})(e):i.languages.match(a,e)>0&&t.isVisible(e),p=e=>i.languages.match(a,e.document)>0&&t.isVisible(e.notebook.uri),f=e=>e instanceof i.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new g(e,t,n),this.backgroundScheduler=new m(e,this.diagnosticRequestor);const v=e=>{d(e)&&n.interFileDependencies&&!f(e)&&!1!==r.onChange&&this.backgroundScheduler.add(e)},y=(e,t)=>(void 0===r.filter||!r.filter(e,t))&&this.diagnosticRequestor.knows(h.document,e);this.activeTextDocument=i.window.activeTextEditor?.document,c.push(i.window.onDidChangeActiveTextEditor(e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&v(t),void 0!==this.activeTextDocument&&(this.backgroundScheduler.remove(this.activeTextDocument),!0===r.onFocus&&d(this.activeTextDocument)&&y(this.activeTextDocument,l.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))}));const b=e.getFeature(o.DidOpenTextDocumentNotification.method);c.push(b.onNotificationSent(e=>{const t=e.textDocument;this.diagnosticRequestor.knows(h.document,t)||d(t)&&this.diagnosticRequestor.pull(t,()=>{v(t)})}));const _=e.getFeature(o.NotebookDocumentSyncRegistrationType.method);c.push(_.onOpenNotificationSent(e=>{for(const t of e.getCells())p(t)&&this.diagnosticRequestor.pull(t.document,()=>{v(t.document)})})),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 i.workspace.textDocuments)if(e===t.uri.toString()){n=t;break}void 0!==n&&d(n)&&this.diagnosticRequestor.pull(n,()=>{v(n)})}}));const C=new Set;for(const e of i.workspace.textDocuments)d(e)&&(this.diagnosticRequestor.pull(e,()=>{v(e)}),C.add(e.uri.toString()));for(const e of i.workspace.notebookDocuments)for(const t of e.getCells())p(t)&&(this.diagnosticRequestor.pull(t.document,()=>{v(t.document)}),C.add(t.document.uri.toString()));if(!0===r.onTabs)for(const e of t.getTabResources())!C.has(e.toString())&&d(e)&&this.diagnosticRequestor.pull(e,()=>{v(e)});if(!0===r.onChange){const t=e.getFeature(o.DidChangeTextDocumentNotification.method);c.push(t.onNotificationSent(async e=>{const t=e.textDocument;y(t,l.onType)&&this.diagnosticRequestor.pull(t,()=>{this.backgroundScheduler.trigger()})})),c.push(_.onChangeNotificationSent(async e=>{const t=(e.cells?.textContent||[]).map(t=>e.notebook.getCells().find(e=>e.document.uri.toString()===t.document.uri.toString()));for(const e of t)e&&p(e)&&this.diagnosticRequestor.pull(e.document,()=>{this.backgroundScheduler.trigger()});const n=e.cells?.structure?.didClose||[];for(const e of n)this.diagnosticRequestor.forgetDocument(e.document);const i=e.cells?.structure?.didOpen||[];for(const e of i)p(e)&&this.diagnosticRequestor.pull(e.document,()=>{this.backgroundScheduler.trigger()})}))}if(!0===r.onSave){const t=e.getFeature(o.DidSaveTextDocumentNotification.method);c.push(t.onNotificationSent(e=>{const t=e.textDocument;y(t,l.onSave)&&this.diagnosticRequestor.pull(e.textDocument)})),c.push(_.onSaveNotificationSent(e=>{for(const t of e.getCells())p(t)&&this.diagnosticRequestor.pull(t.document)}))}const D=e.getFeature(o.DidCloseTextDocumentNotification.method);c.push(D.onNotificationSent(e=>{this.cleanUpDocument(e.textDocument)})),c.push(_.onCloseNotificationSent(e=>{for(const t of e.getCells())this.cleanUpDocument(t.document)})),t.onClose(e=>{for(const t of e)this.cleanUpDocument(t)}),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(const e of i.workspace.textDocuments)d(e)&&this.diagnosticRequestor.pull(e)}),!0===n.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==n.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=i.Disposable.from(...c,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(h.document,e)&&this.diagnosticRequestor.forgetDocument(e)}}class y extends a.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){const t=c(c(e,"textDocument"),"diagnostic");t.relatedInformation=!0,t.tagSupport={valueSet:[o.DiagnosticTag.Unnecessary,o.DiagnosticTag.Deprecated]},t.codeDescriptionSupport=!0,t.dataSupport=!0,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()});const[n,i]=this.getRegistration(t,e.diagnosticProvider);n&&i&&this.register({id:n,registerOptions:i})}clear(){super.clear()}refresh(){for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){const t=new v(this._client,this._client.tabsModel,e);return[t.disposable,t]}}t.DiagnosticFeature=y},7086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.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,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:i.code2ProtocolConverter.asPositionsSync(t,n)};return i.sendRequest(o.SelectionRangeRequest.type,r,n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSelectionRanges(e,n),e=>i.handleFailedRequest(o.SelectionRangeRequest.type,n,e,null))},s=i.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,r):r(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},7096:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CM=t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const i=n(9765);var o,r;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(o||(t.MessageDirection=o={})),t.RegistrationType=class{____;method;constructor(e){this.method=e}};class s extends i.RequestType0{__;___;____;_pr;constructor(e){super(e)}}t.ProtocolRequestType0=s;class a extends i.RequestType{__;___;____;_pr;constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=a;class c extends i.NotificationType0{___;____;constructor(e){super(e)}}t.ProtocolNotificationType0=c;class u extends i.NotificationType{___;____;constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=u,function(e){e.create=function(e,t){return{client:e,server:t}}}(r||(t.CM=r={}))},7173:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",o=0,r=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(r===a-1||1===s);else if(r!==a-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",o=0):o=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),r=a,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),o=a-r-1;r=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var i={resolve:function(){for(var e,i="",o=!1,r=arguments.length-1;r>=-1&&!o;r--){var s;r>=0?s=arguments[r]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=n(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&o&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var r=e.length,s=r-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(o+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var p="";for(d=o+l+1;d<=r;++d)d!==r&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,o=-1,r=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!r){o=s;break}}else r=!1;return-1===o?i?"/":".":i&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,o=0,r=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(47===u){if(!s){o=i+1;break}}else-1===c&&(s=!1,c=i+1),a>=0&&(u===n.charCodeAt(a)?-1===--a&&(r=i):(a=-1,r=c))}return o===r?r=c:-1===r&&(r=e.length),e.slice(o,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){o=i+1;break}}else-1===r&&(s=!1,r=i+1);return-1===r?"":e.slice(o,r)},extname:function(e){t(e);for(var n=-1,i=0,o=-1,r=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(r=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!r){i=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,o=e.charCodeAt(0),r=47===o;r?(n.root="/",i=1):i=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=i;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&r?e.slice(1,c):e.slice(a,c)):(0===a&&r?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):r&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},7252:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.DocumentLink{data;constructor(e,t){super(e,t)}}t.default=c},7267:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(7096);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.selectionRange","selectionRangeProvider")}(o||(t.SelectionRangeRequest=o={}))},7327:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentColorRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){const[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,r=(e,t,n)=>{const r={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(o.ColorPresentationRequest.type,r,n).then(e=>n.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,n),e=>i.handleFailedRequest(o.ColorPresentationRequest.type,n,e,null))},s=i.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,r):r(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.DocumentColorRequest.type,i,t).then(e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t),e=>n.handleFailedRequest(o.DocumentColorRequest.type,t,e,null))},r=n.middleware;return r.provideDocumentColors?r.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.ColorProviderFeature=s},7365:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),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.TraceValue=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0,t.createMessageConnection=function(e,n,i,o){const r=void 0!==i?i:t.NullLogger;let s=0,a=0,b=0;const S="2.0",T=o?.maxParallelism??-1;let P,O=0;const M=new Map;let j;const E=new Map,N=new Map;let I,L,A=new d.LinkedMap,H=new Map,K=new Set,W=new Map,U=y.Off,z=_.Text,$=q.New;const B=new h.Emitter,V=new h.Emitter,G=new h.Emitter,J=new h.Emitter,Q=new h.Emitter,X=o&&o.cancellationStrategy?o.cancellationStrategy:k.Message;function Z(e){}function Y(){return $===q.Listening}function ee(){return $===q.Closed}function te(){return $===q.Disposed}function ne(){$!==q.New&&$!==q.Listening||($=q.Closed,V.fire(void 0))}function ie(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 oe(){I||0===A.size||-1!==T&&O>=T||(I=(0,c.default)().timer.setImmediate(async()=>{if(I=void 0,0===A.size)return;if(-1!==T&&O>=T)return;const e=A.shift();let t;try{O++;const n=o?.messageStrategy;t=x.is(n)?n.handleMessage(e,re):re(e)}catch(e){r.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then(()=>{O--,oe()}).catch(e=>{r.error(`Processing message queue failed: ${e.toString()}`)}):O--,oe()}}))}async function re(e){return l.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,i,o){const r={jsonrpc:S,id:e.id};return t instanceof l.ResponseError?r.error=t.toJson():r.result=void 0===t?null:t,ue(r,i,o),n.write(r)}function i(t,i,o){const r={jsonrpc:S,id:e.id,error:t.toJson()};return ue(r,i,o),n.write(r)}!function(e){if(U!==y.Off&&L)if(z===_.Text){let t;U!==y.Verbose&&U!==y.Compact||!e.params||(t=`Params: ${ce(e.params)}`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else de("receive-request",e)}(e);const o=M.get(e.method);let r,s;o&&(r=o.type,s=o.handler);const a=Date.now();if(s||P){const n=e.id??String(Date.now()),o=R.is(X.receiver)?X.receiver.createCancellationTokenSource(n):X.receiver.createCancellationTokenSource(e);null!==e.id&&K.has(e.id)&&o.cancel(),null!==e.id&&W.set(n,o);try{let n;if(s)if(void 0===e.params){if(void 0!==r&&0!==r.numberOfParams)return i(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines ${r.numberOfParams} params but received none.`),e.method,a);n=s(o.token)}else if(Array.isArray(e.params)){if(void 0!==r&&r.parameterStructures===l.ParameterStructures.byName)return i(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,a);n=s(...e.params,o.token)}else{if(void 0!==r&&r.parameterStructures===l.ParameterStructures.byPosition)return i(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,a);n=s(e.params,o.token)}else P&&(n=P(e.method,e.params,o.token));const c=await n;await t(c,e.method,a)}catch(n){n instanceof l.ResponseError?await t(n,e.method,a):n&&u.string(n.message)?await i(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):await i(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}finally{W.delete(n)}}else await i(new l.ResponseError(l.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,a)}(e):l.Message.isNotification(e)?async function(e){if(te())return;let t,n;if(e.method===f.type.method){const t=e.params.id;return K.delete(t),void le(e)}{const i=E.get(e.method);i&&(n=i.handler,t=i.type)}if(n||j)try{if(le(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==l.ParameterStructures.byName&&r.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){const i=e.params;e.method===m.type.method&&2===i.length&&g.is(i[0])?await n({token:i[0],value:i[1]}):(void 0!==t&&(t.parameterStructures===l.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`)),await n(...i))}else void 0!==t&&t.parameterStructures===l.ParameterStructures.byPosition&&r.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params);else j&&await j(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 G.fire(e)}(e):l.Message.isResponse(e)?ae(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(u.string(t.id)||u.number(t.id)){const e=t.id,n=H.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ne),e.onError(function(e){B.fire([e,void 0,void 0])}),n.onClose(ne),n.onError(function(e){B.fire(e)});const se=e=>{try{if(l.Message.isNotification(e)&&e.method===f.type.method){const t=e.params.id,i=ie(t),s=A.get(i);if(l.Message.isRequest(s)){const a=o?.connectionStrategy,c=a&&a.cancelUndispatched?a.cancelUndispatched(s,Z):void 0;if(c&&(void 0!==c.error||void 0!==c.result))return A.delete(i),W.delete(t),c.id=s.id,ue(c,e.method,Date.now()),void n.write(c).catch(()=>r.error("Sending response for canceled message failed."))}const a=W.get(t);if(void 0!==a)return a.cancel(),void le(e);K.add(t)}!function(e,t){var n;l.Message.isRequest(t)?e.set(ie(t.id),t):l.Message.isResponse(t)?-1===T?e.set(null===(n=t.id)?"res-unknown-"+(++b).toString():"res-"+n.toString(),t):ae(t):e.set("not-"+(++a).toString(),t)}(A,e)}finally{oe()}};function ae(e){if(!te())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=H.get(t);if(function(e,t){if(U!==y.Off&&L)if(z===_.Text){let n;if(U!==y.Verbose&&U!==y.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}`:e.result?n=`Result: ${ce(e.result)}`:void 0===e.error&&(n="No result returned.")),t){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else L.log(`Received response ${e.id} without active response promise.`,n)}else de("receive-response",e)}(e,n),void 0!==n){H.delete(t);try{if(e.error){const t=e.error;n.reject(new l.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.`)}}}}function ce(e){if(null!=e)switch(U){case y.Verbose:return JSON.stringify(e,null,4);case y.Compact:return JSON.stringify(e);default:return}}function ue(e,t,n){if(U!==y.Off&&L)if(z===_.Text){let i;U!==y.Verbose&&U!==y.Compact||(e.error&&e.error.data?i=`Error data: ${ce(e.error.data)}`:e.result?i=`Result: ${ce(e.result)}`:void 0===e.error&&(i="No result returned.")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else de("send-response",e)}function le(e){if(U!==y.Off&&L&&e.method!==D.type.method)if(z===_.Text){let t;U!==y.Verbose&&U!==y.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),L.log(`Received notification '${e.method}'.`,t)}else de("receive-notification",e)}function de(e,t){if(!L||U===y.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(n)}function he(){if(ee())throw new F(w.Closed,"Connection is closed.");if(te())throw new F(w.Disposed,"Connection is disposed.")}function pe(e){return void 0===e?null:e}function fe(e){return null===e?void 0:e}function ge(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function me(e,t){switch(e){case l.ParameterStructures.auto:return ge(t)?fe(t):[pe(t)];case l.ParameterStructures.byName:if(!ge(t))throw new Error("Received parameters by name but param is not an object literal.");return fe(t);case l.ParameterStructures.byPosition:return[pe(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ve(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=me(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(pe(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const ye={sendNotification:(e,...t)=>{let i,o;if(he(),u.string(e)){i=e;const n=t[0];let r=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(n)&&(r=1,s=n);const a=t.length,c=a-r;switch(c){case 0:o=void 0;break;case 1:o=me(s,t[r]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);o=t.slice(r,a).map(e=>pe(e))}}else{const n=t;i=e.method,o=ve(e,n)}const s={jsonrpc:S,method:i,params:o};return function(e){if(U!==y.Off&&L)if(z===_.Text){let t;U!==y.Verbose&&U!==y.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),L.log(`Sending notification '${e.method}'.`,t)}else de("send-notification",e)}(s),n.write(s).catch(e=>{throw r.error("Sending notification failed."),e})},onNotification:(e,t)=>{let n;return he(),u.func(e)?j=e:t&&(u.string(e)?(n=e,E.set(e,{type:void 0,handler:t})):(n=e.method,E.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?E.get(n)?.handler===t&&E.delete(n):j===e&&(j=void 0)}}},onProgress:(e,t,n)=>{if(N.has(t))throw new Error(`Progress handler for token ${t} already registered`);return N.set(t,n),{dispose:()=>{N.get(t)===n&&N.delete(t)}}},sendProgress:(e,t,n)=>ye.sendNotification(m.type,{token:t,value:n}),onUnhandledProgress:J.event,sendRequest:(e,...t)=>{function i(e,t){const n=X.sender.sendCancellation(e,t);void 0===n?r.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch(()=>{r.log(`Sending cancellation messages for id ${t} failed.`)})}let o,a,c;if(he(),function(){if(!Y())throw new Error("Call listen() first.")}(),u.string(e)){o=e;const n=t[0],i=t[t.length-1];let r=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(n)&&(r=1,s=n);let u=t.length;p.CancellationToken.is(i)&&(u-=1,c=i);const d=u-r;switch(d){case 0:a=void 0;break;case 1:a=me(s,t[r]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);a=t.slice(r,u).map(e=>pe(e))}}else{const n=t;o=e.method,a=ve(e,n);const i=e.numberOfParams;c=p.CancellationToken.is(n[i])?n[i]:void 0}const d=s++;let h,f=!1;void 0!==c&&(c.isCancellationRequested?f=!0:h=c.onCancellationRequested(()=>{i(ye,d)}));const g={jsonrpc:S,id:d,method:o,params:a};return function(e){if(U!==y.Off&&L)if(z===_.Text){let t;U!==y.Verbose&&U!==y.Compact||!e.params||(t=`Params: ${ce(e.params)}`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else de("send-request",e)}(g),"function"==typeof X.sender.enableCancellation&&X.sender.enableCancellation(g),new Promise(async(e,t)=>{const s={method:o,timerStart:Date.now(),resolve:t=>{e(t),X.sender.cleanup(d),h?.dispose()},reject:e=>{t(e),X.sender.cleanup(d),h?.dispose()}};try{H.set(d,s),await n.write(g),f&&i(ye,d)}catch(e){throw H.delete(d),s.reject(new l.ResponseError(l.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),r.error("Sending request failed."),e}})},onRequest:(e,t)=>{he();let n=null;return v.is(e)?(n=void 0,P=e):u.string(e)?(n=null,void 0!==t&&(n=e,M.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,M.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?M.get(n)?.handler===t&&M.delete(n):P===e&&(P=void 0))}}},hasPendingResponse:()=>H.size>0,trace:async(e,t,n)=>{let i=!1,o=_.Text;void 0!==n&&(u.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||_.Text)),U=e,z=o,L=U===y.Off?void 0:t,!i||ee()||te()||await ye.sendNotification(C.type,{value:y.toString(e)})},onError:B.event,onClose:V.event,onUnhandledNotification:G.event,onDispose:Q.event,end:()=>{n.end()},dispose:()=>{if(te())return;$=q.Disposed,Q.fire(void 0);const t=new l.ResponseError(l.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of H.values())e.reject(t);H=new Map,W=new Map,K=new Set,A=new d.LinkedMap,u.func(n.dispose)&&n.dispose(),u.func(e.dispose)&&e.dispose()},listen:()=>{he(),function(){if(Y())throw new F(w.AlreadyListening,"Connection is already listening")}(),$=q.Listening,e.listen(se)},inspect:()=>{(0,c.default)().console.log("inspect")}};return ye.onNotification(D.type,e=>{if(U===y.Off||!L)return;const t=U===y.Verbose||U===y.Compact;L.log(e.message,t?e.verbose:void 0)}),ye.onNotification(m.type,async e=>{const t=N.get(e.token);t?await t(e.value):J.fire(e)}),ye};const c=a(n(9042)),u=s(n(6357)),l=n(8045),d=n(5140),h=n(6712),p=n(4782);var f,g,m,v,y,b,_,C,D,w,S,R,T,P,O,k,x,M,q;!function(e){e.type=new l.NotificationType("$/cancelRequest")}(f||(f={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(g||(t.ProgressToken=g={})),function(e){e.type=new l.NotificationType("$/progress")}(m||(m={})),t.ProgressType=class{__;_pr;constructor(){}},function(e){e.is=function(e){return u.func(e)}}(v||(v={})),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"}(y||(t.Trace=y={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(b||(t.TraceValue=b={})),t.TraceValues=b,function(e){e.fromString=function(t){if(!u.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"}}}(y||(t.Trace=y={})),function(e){e.Text="text",e.JSON="json"}(_||(t.TraceFormat=_={})),function(e){e.fromString=function(t){return u.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(_||(t.TraceFormat=_={})),function(e){e.type=new l.NotificationType("$/setTrace")}(C||(t.SetTraceNotification=C={})),function(e){e.type=new l.NotificationType("$/logTrace")}(D||(t.LogTraceNotification=D={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(w||(t.ConnectionErrors=w={}));class F extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,F.prototype)}}t.ConnectionError=F,function(e){e.is=function(e){const t=e;return t&&u.func(t.cancelUndispatched)}}(S||(t.ConnectionStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&u.func(t.createCancellationTokenSource)&&(void 0===t.dispose||u.func(t.dispose))}}(R||(t.IdCancellationReceiverStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&u.func(t.createCancellationTokenSource)&&(void 0===t.dispose||u.func(t.dispose))}}(T||(t.RequestCancellationReceiverStrategy=T={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new p.CancellationTokenSource}),e.is=function(e){return R.is(e)||T.is(e)}}(P||(t.CancellationReceiverStrategy=P={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(f.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&u.func(t.sendCancellation)&&u.func(t.cleanup)}}(O||(t.CancellationSenderStrategy=O={})),function(e){e.Message=Object.freeze({receiver:P.Message,sender:O.Message}),e.is=function(e){const t=e;return t&&P.is(t.receiver)&&O.is(t.sender)}}(k||(t.CancellationStrategy=k={})),function(e){e.is=function(e){const t=e;return t&&u.func(t.handleMessage)}}(x||(t.MessageStrategy=x={})),function(e){e.is=function(e){const t=e;return t&&(k.is(t.cancellationStrategy)||S.is(t.connectionStrategy)||x.is(t.messageStrategy)||u.number(t.maxParallelism))}}(M||(t.ConnectionOptions=M={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(q||(q={}))},7408:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{_encoding;_chunks;_totalLength;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,o=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++}o+=e.byteLength,n++}if(4!==t)return;const r=this._read(o+i),s=new Map,a=this.toString(r,"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 o=n.substr(0,i),r=n.substr(i+1).trim();s.set(e?o.toLowerCase():o,r)}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 o=i.slice(0,e);t.set(o,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}}},7511:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlineValueRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.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,r={onDidChangeInlineValues:n.event,provideInlineValues:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),context:r.code2ProtocolConverter.asInlineValueContext(n)};return r.sendRequest(o.InlineValueRequest.type,s,i).then(e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asInlineValues(e,i),e=>r.handleFailedRequest(o.InlineValueRequest.type,i,e,null))},a=r.middleware;return a.provideInlineValues?a.provideInlineValues(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,r),{provider:r,onDidChangeInlineValues:n}]}registerProvider(e,t){return i.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=s},7523:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.ImplementationRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[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,r=(e,t,n)=>i.sendRequest(o.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n),e=>i.handleFailedRequest(o.ImplementationRequest.type,n,e,null)),s=i.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,r):r(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},7553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const i=n(7096);var o,r,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TypeHierarchySupertypesRequest=r={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},7784:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,n,o){return i.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,i.createMessageConnection)(e,t,n,o)};const i=n(9765)},7786:(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.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}},7921:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.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,r=(e,t,n)=>i.sendRequest(o.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDeclarationResult(e,n),e=>i.handleFailedRequest(o.DeclarationRequest.type,n,e,null)),s=i.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,r):r(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},7975:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const o=i(n(9042));t.Semaphore=class{_capacity;_active;_waiting;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,o.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("Too 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()}}}},7984:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));t.SupportedSymbolKinds=[c.SymbolKind.File,c.SymbolKind.Module,c.SymbolKind.Namespace,c.SymbolKind.Package,c.SymbolKind.Class,c.SymbolKind.Method,c.SymbolKind.Property,c.SymbolKind.Field,c.SymbolKind.Constructor,c.SymbolKind.Enum,c.SymbolKind.Interface,c.SymbolKind.Function,c.SymbolKind.Variable,c.SymbolKind.Constant,c.SymbolKind.String,c.SymbolKind.Number,c.SymbolKind.Boolean,c.SymbolKind.Array,c.SymbolKind.Object,c.SymbolKind.Key,c.SymbolKind.Null,c.SymbolKind.EnumMember,c.SymbolKind.Struct,c.SymbolKind.Event,c.SymbolKind.Operator,c.SymbolKind.TypeParameter],t.SupportedSymbolTags=[c.SymbolTag.Deprecated];class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentSymbolRequest.type)}fillClientCapabilities(e){const n=(0,u.ensure)((0,u.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:l.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(c.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t);if(t.isCancellationRequested||null==i)return null;if(0===i.length)return[];{const e=i[0];return c.DocumentSymbol.is(e)?await n.protocol2CodeConverter.asDocumentSymbols(i,t):await n.protocol2CodeConverter.asSymbolInformations(i,t)}}catch(e){return n.handleFailedRequest(c.DocumentSymbolRequest.type,t,e,null)}},o=n.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,i):i(e,t)}},i=void 0!==e.label?{label:e.label}:void 0;return[a.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,i),n]}}t.DocumentSymbolFeature=d},8045:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});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 a=s(n(6357));var c,u;!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}(c||(t.ErrorCodes=c={}));class l extends Error{code;data;constructor(e,t,n){super(t),this.code=a.number(e)?e:c.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,l.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=l;class d{kind;static auto=new d("auto");static byPosition=new d("byPosition");static byName=new d("byName");constructor(e){this.kind=e}static is(e){return e===d.auto||e===d.byName||e===d.byPosition}toString(){return this.kind}}t.ParameterStructures=d;class h{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return d.auto}}t.AbstractMessageSignature=h,t.RequestType0=class extends h{_;constructor(e){super(e,0)}},t.RequestType=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends h{_;constructor(e){super(e,2)}},t.RequestType3=class extends h{_;constructor(e){super(e,3)}},t.RequestType4=class extends h{_;constructor(e){super(e,4)}},t.RequestType5=class extends h{_;constructor(e){super(e,5)}},t.RequestType6=class extends h{_;constructor(e){super(e,6)}},t.RequestType7=class extends h{_;constructor(e){super(e,7)}},t.RequestType8=class extends h{_;constructor(e){super(e,8)}},t.RequestType9=class extends h{_;constructor(e){super(e,9)}},t.NotificationType=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends h{_;constructor(e){super(e,0)}},t.NotificationType1=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends h{_;constructor(e){super(e,2)}},t.NotificationType3=class extends h{_;constructor(e){super(e,3)}},t.NotificationType4=class extends h{_;constructor(e){super(e,4)}},t.NotificationType5=class extends h{_;constructor(e){super(e,5)}},t.NotificationType6=class extends h{_;constructor(e){super(e,6)}},t.NotificationType7=class extends h{_;constructor(e){super(e,7)}},t.NotificationType8=class extends h{_;constructor(e){super(e,8)}},t.NotificationType9=class extends h{_;constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&a.string(t.method)&&(a.string(t.id)||a.number(t.id))},e.isNotification=function(e){const t=e;return t&&a.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(a.string(t.id)||a.number(t.id)||null===t.id)}}(u||(t.Message=u={}))},8382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(1398),o=n(3434),r=n(9810);class s{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.CallHierarchyPrepareRequest.type,r,n).then(e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(e,n),e=>i.handleFailedRequest(o.CallHierarchyPrepareRequest.type,n,e,null))};return r.prepareCallHierarchy?r.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyIncomingCallsRequest.type,i,t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t),e=>n.handleFailedRequest(o.CallHierarchyIncomingCallsRequest.type,t,e,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,r):r(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyOutgoingCallsRequest.type,i,t).then(e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t),e=>n.handleFailedRequest(o.CallHierarchyOutgoingCallsRequest.type,t,e,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,r.ensure)((0,r.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},8575:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const i=n(7096);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")}(o||(t.InlineCompletionRequest=o={}))},8820:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=void 0,t.v4=o,t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()};class n{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends n{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];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 o(){return new i}t.empty=new n("00000000-0000-0000-0000-000000000000");const r=/^[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 r.test(e)}},8958:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const i=n(7096);var o,r;!function(e){e.method="textDocument/foldingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.foldingRange","foldingRangeProvider")}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method),e.capabilities=i.CM.create("workspace.foldingRange.refreshSupport",void 0)}(r||(t.FoldingRangeRefreshRequest=r={}))},9042:(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},9248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(7096);var o;!function(e){e.method="window/showDocument",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("window.showDocument.support",void 0)}(o||(t.ShowDocumentRequest=o={}))},9488:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(7096);var o;!function(e){e.method="workspace/configuration",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("workspace.configuration",void 0)}(o||(t.ConfigurationRequest=o={}))},9504:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const a=n(1398),c=n(3434),u=n(9810),l=s(n(8820));class d extends u.TextDocumentEventFeature{_syncedDocuments;_pendingOpenNotifications;_delayOpen;_pendingOpenListeners;constructor(e,t){super(e,a.workspace.onDidOpenTextDocument,c.DidOpenTextDocumentNotification.type,()=>e.middleware.didOpen,t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t),e=>e,u.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){return this._delayOpen?this.matches(e)?this._client.tabsModel.isVisible(e)?super.callback(e):void this._pendingOpenNotifications.set(e.uri.toString(),e):void 0:super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return c.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(a.workspace.textDocuments.forEach(e=>{const n=e.uri.toString();if(!this._syncedDocuments.has(n)&&a.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e))if(this._client.tabsModel.isVisible(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)}else this._pendingOpenNotifications.set(n,e)}),this._delayOpen&&void 0===this._pendingOpenListeners){this._pendingOpenListeners=[];const e=this._client.tabsModel;this._pendingOpenListeners.push(e.onClose(e=>{for(const t of e)this._pendingOpenNotifications.delete(t.toString())})),this._pendingOpenListeners.push(e.onOpen(e=>{for(const t of e){const e=this._pendingOpenNotifications.get(t.toString());void 0!==e&&(super.callback(e).catch(e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}),this._pendingOpenNotifications.delete(t.toString()))}})),this._pendingOpenListeners.push(a.workspace.onDidCloseTextDocument(e=>{this._pendingOpenNotifications.delete(e.uri.toString())}))}}async sendPendingOpenNotifications(e){const t=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();let n=!1;for(const i of t)void 0===e||i.uri.toString()!==e?await super.callback(i):n=!0;return n}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,n)}clear(){if(this._pendingOpenNotifications.clear(),void 0!==this._pendingOpenListeners){for(const e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}}t.DidOpenTextDocumentFeature=d;class h extends u.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,t,n){super(e,a.workspace.onDidCloseTextDocument,c.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t),e=>e,u.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=n}get registrationType(){return c.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.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);if(void 0===t)return;super.unregister(e);const n=this._selectors.values();this._syncedDocuments.forEach(e=>{if(a.languages.match(t,e)>0&&!this._selectorFilter(n,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const 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=h;class p extends u.DynamicDocumentFeature{_listener;_changeData;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new a.EventEmitter,this._onPendingChangeAdded=new a.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=c.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return c.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==c.TextDocumentSyncKind.None&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=a.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,i=[];for(const o of this._changeData.values())if(a.languages.match(o.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const r=this._client.middleware;if(o.syncKind===c.TextDocumentSyncKind.Incremental){const o=async e=>{const i=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e,t,n);await this._client.sendNotification(c.DidChangeTextDocumentNotification.type,i),this.notificationSent(e.document,c.DidChangeTextDocumentNotification.type,i)};i.push(r.didChange?r.didChange(e,e=>o(e)):o(e))}else if(o.syncKind===c.TextDocumentSyncKind.Full){const t=async e=>{const t=e.document.uri.toString();this._pendingTextDocumentChanges.set(t,e.document),this._onPendingChangeAdded.fire()};i.push(r.didChange?r.didChange(e,e=>t(e)):t(e))}}return Promise.all(i).then(void 0,e=>{throw this._client.error(`Sending document notification ${c.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=c.TextDocumentSyncKind.None;else{this._syncKind=c.TextDocumentSyncKind.None;for(const e of this._changeData.values())if(this.updateSyncKind(e.syncKind),this._syncKind===c.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=c.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(a.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}updateSyncKind(e){if(this._syncKind!==c.TextDocumentSyncKind.Full)switch(e){case c.TextDocumentSyncKind.Full:this._syncKind=e;break;case c.TextDocumentSyncKind.Incremental:this._syncKind===c.TextDocumentSyncKind.None&&(this._syncKind=c.TextDocumentSyncKind.Incremental)}}}t.DidChangeTextDocumentFeature=p;class f extends u.TextDocumentEventFeature{constructor(e){super(e,a.workspace.onWillSaveTextDocument,c.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),e=>e.document,(e,t)=>u.TextDocumentEventFeature.textDocumentFilter(e,t.document))}get registrationType(){return c.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}}t.WillSaveFeature=f;class g extends u.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return c.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=a.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(u.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const t=this._client.middleware,n=e=>this._client.sendRequest(c.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then(async e=>{const 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=g;class m extends u.TextDocumentEventFeature{_includeText;constructor(e){super(e,a.workspace.onDidSaveTextDocument,c.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),e=>e,u.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return c.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.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:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}}t.DidSaveTextDocumentFeature=m},9744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(7096);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.capabilities=i.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")}(o||(t.LinkedEditingRangeRequest=o={}))},9765:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};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.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=void 0;const o=n(8045);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return o.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return o.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return o.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return o.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return o.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return o.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return o.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return o.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return o.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return o.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return o.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return o.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return o.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return o.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return o.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return o.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return o.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return o.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return o.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return o.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return o.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return o.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return o.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return o.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return o.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return o.ParameterStructures}});const r=n(5140);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 s=n(3167);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=n(6712);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return a.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return a.Emitter}});const c=n(4782);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});const u=n(5584);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return u.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return u.SharedArrayReceiverStrategy}});const l=n(1977);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const d=n(2549);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return d.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return d.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return d.WriteableStreamMessageWriter}});const h=n(7408);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return h.AbstractMessageBuffer}});const p=n(7365);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return p.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.IdCancellationReceiverStrategy}}),Object.defineProperty(t,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.RequestCancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return p.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}});const f=i(n(9042));t.RAL=f.default},9810:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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}),s=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.LSPCancellationError=void 0,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]};const a=n(1398),c=n(3434),u=s(n(1027)),l=s(n(8820));class d extends a.CancellationError{data;constructor(e){super(),this.data=e}}var h,p;t.LSPCancellationError=d,function(e){e.is=function(e){const t=e;return null!=t&&u.func(t.fillClientCapabilities)&&u.func(t.initialize)&&u.func(t.getState)&&u.func(t.clear)&&(void 0===t.fillInitializeParams||u.func(t.fillInitializeParams))}}(h||(t.StaticFeature=h={})),function(e){e.is=function(e){const t=e;return null!=t&&u.func(t.fillClientCapabilities)&&u.func(t.initialize)&&u.func(t.getState)&&u.func(t.clear)&&(void 0===t.fillInitializeParams||u.func(t.fillInitializeParams))&&u.func(t.register)&&u.func(t.unregister)&&void 0!==t.registrationType}}(p||(t.DynamicFeature=p={}));class f{_client;constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const n of e){t++;for(const e of a.workspace.textDocuments)if(a.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=f,t.TextDocumentEventFeature=class extends f{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onNotificationSent;static textDocumentFilter(e,t){for(const n of e)if(a.languages.match(n,t)>0)return!0;return!1}constructor(e,t,n,i,o,r,s){super(e),this._event=t,this._type=n,this._middleware=i,this._createParams=o,this._textDocument=r,this._selectorFilter=s,this._selectors=new Map,this._onNotificationSent=new a.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._onNotificationSent=new a.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(a.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends f{_registrationType;_registrations;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;const t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){const t=this._registrations.get(e);void 0!==t&&(this._registrations.delete(e),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(c.TextDocumentRegistrationOptions.is(t)){const n=c.StaticRegistrationOptions.hasId(t)?t.id:l.generateUuid(),i=t.documentSelector??e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(u.boolean(t)&&!0===t||c.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];const n=u.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[l.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return u.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){const n=t.data.registerOptions.documentSelector;if(null!==n&&a.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{_client;_registrationType;_registrations;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){const t=this._registrations.get(e);void 0!==t&&(this._registrations.delete(e),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}}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.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={};(()=>{"use strict";var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.activate=async function(e){const n=t.Uri.joinPath(e.extensionUri,"server/dist/browser/cssServerMain.js");try{const i=new Worker(n.toString());i.postMessage({i10lLocation:t.l10n.uri?.toString(!0)??""});const c=(e,t,n)=>new r.LanguageClient(e,t,i,n);a=await(0,o.startClient)(e,c,{TextDecoder}),e.subscriptions.push((0,s.registerDropOrPasteResourceSupport)({language:"css",scheme:"*"}))}catch(e){console.log(e)}},e.deactivate=async function(){a&&(await a.stop(),a=void 0)};const t=n(1398),o=n(3075),r=n(3587),s=n(3544);let a})();var o=exports;for(var r in i)o[r]=i[r];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
2
|
-
|
|
1
|
+
"use strict";var Nv=Object.create;var xo=Object.defineProperty;var kv=Object.getOwnPropertyDescriptor;var Av=Object.getOwnPropertyNames;var Lv=Object.getPrototypeOf,Hv=Object.prototype.hasOwnProperty;var Bf=(n,e)=>()=>(n&&(e=n(n=0)),e);var F=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Vf=(n,e)=>{for(var t in e)xo(n,t,{get:e[t],enumerable:!0})},Gf=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Av(e))!Hv.call(n,i)&&i!==t&&xo(n,i,{get:()=>e[i],enumerable:!(r=kv(e,i))||r.enumerable});return n};var Or=(n,e,t)=>(t=n!=null?Nv(Lv(n)):{},Gf(e||!n||!n.__esModule?xo(t,"default",{value:n,enumerable:!0}):t,n)),Mo=n=>Gf(xo({},"__esModule",{value:!0}),n);var q,y=Bf(()=>{q={}});var Qr=F(Nn=>{"use strict";y();Object.defineProperty(Nn,"__esModule",{value:!0});Nn.boolean=Wv;Nn.string=Jf;Nn.number=$v;Nn.error=zv;Nn.func=Kv;Nn.array=Qf;Nn.stringArray=Bv;function Wv(n){return n===!0||n===!1}function Jf(n){return typeof n=="string"||n instanceof String}function $v(n){return typeof n=="number"||n instanceof Number}function zv(n){return n instanceof Error}function Kv(n){return typeof n=="function"}function Qf(n){return Array.isArray(n)}function Bv(n){return Qf(n)&&n.every(e=>Jf(e))}});var ka=F(X=>{"use strict";y();var Vv=X&&X.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Gv=X&&X.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Jv=X&&X.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&Vv(t,e,r[i]);return Gv(t,e),t}})();Object.defineProperty(X,"__esModule",{value:!0});X.Message=X.NotificationType9=X.NotificationType8=X.NotificationType7=X.NotificationType6=X.NotificationType5=X.NotificationType4=X.NotificationType3=X.NotificationType2=X.NotificationType1=X.NotificationType0=X.NotificationType=X.RequestType9=X.RequestType8=X.RequestType7=X.RequestType6=X.RequestType5=X.RequestType4=X.RequestType3=X.RequestType2=X.RequestType1=X.RequestType=X.RequestType0=X.AbstractMessageSignature=X.ParameterStructures=X.ResponseError=X.ErrorCodes=void 0;var qr=Jv(Qr()),ha;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(ha||(X.ErrorCodes=ha={}));var pa=class n extends Error{code;data;constructor(e,t,r){super(t),this.code=qr.number(e)?e:ha.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};X.ResponseError=pa;var cr=class n{kind;static auto=new n("auto");static byPosition=new n("byPosition");static byName=new n("byName");constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};X.ParameterStructures=cr;var Ee=class{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return cr.auto}};X.AbstractMessageSignature=Ee;var ga=class extends Ee{_;constructor(e){super(e,0)}};X.RequestType0=ga;var ma=class extends Ee{_parameterStructures;_;constructor(e,t=cr.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};X.RequestType=ma;var ya=class extends Ee{_parameterStructures;_;constructor(e,t=cr.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};X.RequestType1=ya;var va=class extends Ee{_;constructor(e){super(e,2)}};X.RequestType2=va;var _a=class extends Ee{_;constructor(e){super(e,3)}};X.RequestType3=_a;var ba=class extends Ee{_;constructor(e){super(e,4)}};X.RequestType4=ba;var Ca=class extends Ee{_;constructor(e){super(e,5)}};X.RequestType5=Ca;var wa=class extends Ee{_;constructor(e){super(e,6)}};X.RequestType6=wa;var Da=class extends Ee{_;constructor(e){super(e,7)}};X.RequestType7=Da;var Sa=class extends Ee{_;constructor(e){super(e,8)}};X.RequestType8=Sa;var Pa=class extends Ee{_;constructor(e){super(e,9)}};X.RequestType9=Pa;var Ra=class extends Ee{_parameterStructures;_;constructor(e,t=cr.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};X.NotificationType=Ra;var Ta=class extends Ee{_;constructor(e){super(e,0)}};X.NotificationType0=Ta;var Oa=class extends Ee{_parameterStructures;_;constructor(e,t=cr.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};X.NotificationType1=Oa;var qa=class extends Ee{_;constructor(e){super(e,2)}};X.NotificationType2=qa;var xa=class extends Ee{_;constructor(e){super(e,3)}};X.NotificationType3=xa;var Ma=class extends Ee{_;constructor(e){super(e,4)}};X.NotificationType4=Ma;var Ea=class extends Ee{_;constructor(e){super(e,5)}};X.NotificationType5=Ea;var ja=class extends Ee{_;constructor(e){super(e,6)}};X.NotificationType6=ja;var Fa=class extends Ee{_;constructor(e){super(e,7)}};X.NotificationType7=Fa;var Ia=class extends Ee{_;constructor(e){super(e,8)}};X.NotificationType8=Ia;var Na=class extends Ee{_;constructor(e){super(e,9)}};X.NotificationType9=Na;var Xf;(function(n){function e(i){let o=i;return o&&qr.string(o.method)&&(qr.string(o.id)||qr.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&qr.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(qr.string(o.id)||qr.number(o.id)||o.id===null)}n.isResponse=r})(Xf||(X.Message=Xf={}))});var La=F(ur=>{"use strict";y();Object.defineProperty(ur,"__esModule",{value:!0});ur.LRUCache=ur.LinkedMap=ur.Touch=void 0;var lt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(lt||(ur.Touch=lt={}));var Eo=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let t=this._map.get(e);return t?t.previous?.value:void 0}after(e){let t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=lt.None){let r=this._map.get(e);if(r)return t!==lt.None&&this.touch(r,t),r.value}set(e,t,r=lt.None){let i=this._map.get(e);if(i)i.value=t,r!==lt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case lt.None:this.addItemLast(i);break;case lt.First:this.addItemFirst(i);break;case lt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let 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");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");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{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.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!==lt.First&&t!==lt.Last)){if(t===lt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===lt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};ur.LinkedMap=Eo;var Aa=class extends Eo{_limit;_ratio;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=lt.AsNew){return super.get(e,t)}peek(e){return super.get(e,lt.None)}set(e,t){return super.set(e,t,lt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ur.LRUCache=Aa});var Yf=F(jo=>{"use strict";y();Object.defineProperty(jo,"__esModule",{value:!0});jo.Disposable=void 0;var Zf;(function(n){function e(t){return{dispose:t}}n.create=e})(Zf||(jo.Disposable=Zf={}))});var lr=F(Wa=>{"use strict";y();Object.defineProperty(Wa,"__esModule",{value:!0});var Ha;function Ua(){if(Ha===void 0)throw new Error("No runtime abstraction layer installed");return Ha}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");Ha=t}n.install=e})(Ua||(Ua={}));Wa.default=Ua});var Xr=F(dr=>{"use strict";y();var Qv=dr&&dr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(dr,"__esModule",{value:!0});dr.Emitter=dr.Event=void 0;var Xv=Qv(lr()),eh;(function(n){let e={dispose(){}};n.None=function(){return e}})(eh||(dr.Event=eh={}));var $a=class{_callbacks;_contexts;add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,Xv.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},za=class n{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new $a),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.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)}};dr.Emitter=za});var No=F(wt=>{"use strict";y();var Zv=wt&&wt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Yv=wt&&wt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),e_=wt&&wt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&Zv(t,e,r[i]);return Yv(t,e),t}})(),t_=wt&&wt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wt,"__esModule",{value:!0});wt.CancellationTokenSource=wt.CancellationToken=void 0;var n_=t_(lr()),r_=e_(Qr()),Ka=Xr(),Fo;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ka.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ka.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||r_.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(Fo||(wt.CancellationToken=Fo={}));var i_=Object.freeze(function(n,e){let t=(0,n_.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Io=class{_isCancelled=!1;_emitter;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?i_:(this._emitter||(this._emitter=new Ka.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Ba=class{_token;get token(){return this._token||(this._token=new Io),this._token}cancel(){this._token?this._token.cancel():this._token=Fo.Cancelled}dispose(){this._token?this._token instanceof Io&&this._token.dispose():this._token=Fo.None}};wt.CancellationTokenSource=Ba});var th=F(Zr=>{"use strict";y();Object.defineProperty(Zr,"__esModule",{value:!0});Zr.SharedArrayReceiverStrategy=Zr.SharedArraySenderStrategy=void 0;var o_=No(),Ni;(function(n){n.Continue=0,n.Cancelled=1})(Ni||(Ni={}));var Va=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=Ni.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Ni.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Zr.SharedArraySenderStrategy=Va;var Ga=class{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Ni.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Ja=class{token;constructor(e){this.token=new Ga(e)}cancel(){}dispose(){}},Qa=class{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new o_.CancellationTokenSource:new Ja(t)}};Zr.SharedArrayReceiverStrategy=Qa});var Za=F(Yr=>{"use strict";y();var s_=Yr&&Yr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.Semaphore=void 0;var a_=s_(lr()),Xa=class{_capacity;_active;_waiting;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,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,a_.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Yr.Semaphore=Xa});var rh=F(dt=>{"use strict";y();var c_=dt&&dt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),u_=dt&&dt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),l_=dt&&dt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&c_(t,e,r[i]);return u_(t,e),t}})(),d_=dt&&dt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(dt,"__esModule",{value:!0});dt.ReadableStreamMessageReader=dt.AbstractMessageReader=dt.MessageReader=void 0;var ec=d_(lr()),ei=l_(Qr()),Ya=Xr(),f_=Za(),nh;(function(n){function e(t){let r=t;return r&&ei.func(r.listen)&&ei.func(r.dispose)&&ei.func(r.onError)&&ei.func(r.onClose)&&ei.func(r.onPartialMessage)}n.is=e})(nh||(dt.MessageReader=nh={}));var ko=class{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new Ya.Emitter,this.closeEmitter=new Ya.Emitter,this.partialMessageEmitter=new Ya.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.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: ${ei.string(e.message)?e.message:"unknown"}`)}};dt.AbstractMessageReader=ko;var tc;(function(n){function e(t){let r,i,o,s=new Map,a,u=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let l of t.contentDecoders)s.set(l.name,l);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,u.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let l of t.contentTypeDecoders)u.set(l.name,l)}return a===void 0&&(a=(0,ec.default)().applicationJson.decoder,u.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:u}}n.fromOptions=e})(tc||(tc={}));var nc=class extends ko{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super(),this.readable=e,this.options=tc.fromOptions(t),this.buffer=(0,ec.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new f_.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;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
2
|
+
${JSON.stringify(Object.fromEntries(r))}`));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,ec.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))}};dt.ReadableStreamMessageReader=nc});var ch=F(ft=>{"use strict";y();var h_=ft&&ft.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),p_=ft&&ft.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),g_=ft&&ft.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&h_(t,e,r[i]);return p_(t,e),t}})(),m_=ft&&ft.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ft,"__esModule",{value:!0});ft.WriteableStreamMessageWriter=ft.AbstractMessageWriter=ft.MessageWriter=void 0;var ih=m_(lr()),ki=g_(Qr()),y_=Za(),oh=Xr(),v_="Content-Length: ",sh=`\r
|
|
3
|
+
`,ah;(function(n){function e(t){let r=t;return r&&ki.func(r.dispose)&&ki.func(r.onClose)&&ki.func(r.onError)&&ki.func(r.write)}n.is=e})(ah||(ft.MessageWriter=ah={}));var Ao=class{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new oh.Emitter,this.closeEmitter=new oh.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}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: ${ki.string(e.message)?e.message:"unknown"}`)}};ft.AbstractMessageWriter=Ao;var rc;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,ih.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,ih.default)().applicationJson.encoder}}n.fromOptions=e})(rc||(rc={}));var ic=class extends Ao{writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=rc.fromOptions(t),this.errorCount=0,this.writeSemaphore=new y_.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(v_,r.byteLength.toString(),sh),i.push(sh),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};ft.WriteableStreamMessageWriter=ic});var uh=F(Lo=>{"use strict";y();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.AbstractMessageBuffer=void 0;var __=13,b_=10,C_=`\r
|
|
4
|
+
`,oc=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let l=this._chunks[r];for(i=0;i<l.length;){switch(l[i]){case __:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case b_:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=l.byteLength,r++}if(t!==4)return;let s=this._read(o+i),a=new Map,u=this.toString(s,"ascii").split(C_);if(u.length<2)return a;for(let l=0;l<u.length-2;l++){let f=u[l],h=f.indexOf(":");if(h===-1)throw new Error(`Message header must separate key and value using ':'
|
|
5
|
+
${f}`);let p=f.substr(0,h),m=f.substr(h+1).trim();a.set(e?p.toLowerCase():p,m)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};Lo.AbstractMessageBuffer=oc});var hh=F(te=>{"use strict";y();var w_=te&&te.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),D_=te&&te.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),S_=te&&te.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&w_(t,e,r[i]);return D_(t,e),t}})(),P_=te&&te.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(te,"__esModule",{value:!0});te.ConnectionOptions=te.MessageStrategy=te.CancellationStrategy=te.CancellationSenderStrategy=te.CancellationReceiverStrategy=te.RequestCancellationReceiverStrategy=te.IdCancellationReceiverStrategy=te.ConnectionStrategy=te.ConnectionError=te.ConnectionErrors=te.LogTraceNotification=te.SetTraceNotification=te.TraceFormat=te.TraceValues=te.TraceValue=te.Trace=te.NullLogger=te.ProgressType=te.ProgressToken=void 0;te.createMessageConnection=R_;var lh=P_(lr()),Ue=S_(Qr()),ae=ka(),dh=La(),Ai=Xr(),sc=No(),Ui;(function(n){n.type=new ae.NotificationType("$/cancelRequest")})(Ui||(Ui={}));var ac;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(ac||(te.ProgressToken=ac={}));var Li;(function(n){n.type=new ae.NotificationType("$/progress")})(Li||(Li={}));var cc=class{__;_pr;constructor(){}};te.ProgressType=cc;var uc;(function(n){function e(t){return Ue.func(t)}n.is=e})(uc||(uc={}));te.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var Ce;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(Ce||(te.Trace=Ce={}));var lc;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(lc||(te.TraceValue=lc={}));te.TraceValues=lc;(function(n){function e(r){if(!Ue.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(Ce||(te.Trace=Ce={}));var Et;(function(n){n.Text="text",n.JSON="json"})(Et||(te.TraceFormat=Et={}));(function(n){function e(t){return Ue.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(Et||(te.TraceFormat=Et={}));var dc;(function(n){n.type=new ae.NotificationType("$/setTrace")})(dc||(te.SetTraceNotification=dc={}));var Ho;(function(n){n.type=new ae.NotificationType("$/logTrace")})(Ho||(te.LogTraceNotification=Ho={}));var Hi;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Hi||(te.ConnectionErrors=Hi={}));var ti=class n extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};te.ConnectionError=ti;var fc;(function(n){function e(t){let r=t;return r&&Ue.func(r.cancelUndispatched)}n.is=e})(fc||(te.ConnectionStrategy=fc={}));var Uo;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Ue.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Ue.func(r.dispose))}n.is=e})(Uo||(te.IdCancellationReceiverStrategy=Uo={}));var hc;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Ue.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Ue.func(r.dispose))}n.is=e})(hc||(te.RequestCancellationReceiverStrategy=hc={}));var Wo;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new sc.CancellationTokenSource}});function e(t){return Uo.is(t)||hc.is(t)}n.is=e})(Wo||(te.CancellationReceiverStrategy=Wo={}));var $o;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(Ui.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Ue.func(r.sendCancellation)&&Ue.func(r.cleanup)}n.is=e})($o||(te.CancellationSenderStrategy=$o={}));var zo;(function(n){n.Message=Object.freeze({receiver:Wo.Message,sender:$o.Message});function e(t){let r=t;return r&&Wo.is(r.receiver)&&$o.is(r.sender)}n.is=e})(zo||(te.CancellationStrategy=zo={}));var Ko;(function(n){function e(t){let r=t;return r&&Ue.func(r.handleMessage)}n.is=e})(Ko||(te.MessageStrategy=Ko={}));var fh;(function(n){function e(t){let r=t;return r&&(zo.is(r.cancellationStrategy)||fc.is(r.connectionStrategy)||Ko.is(r.messageStrategy)||Ue.number(r.maxParallelism))}n.is=e})(fh||(te.ConnectionOptions=fh={}));var Vt;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(Vt||(Vt={}));function R_(n,e,t,r){let i=t!==void 0?t:te.NullLogger,o=0,s=0,a=0,u="2.0",l=r?.maxParallelism??-1,f=0,h,p=new Map,m,b=new Map,C=new Map,j,U=new dh.LinkedMap,E=new Map,L=new Set,Y=new Map,k=Ce.Off,le=Et.Text,ue,De=Vt.New,vt=new Ai.Emitter,on=new Ai.Emitter,H=new Ai.Emitter,R=new Ai.Emitter,V=new Ai.Emitter,K=r&&r.cancellationStrategy?r.cancellationStrategy:zo.Message;function P(v){}function M(){return De===Vt.Listening}function I(){return De===Vt.Closed}function z(){return De===Vt.Disposed}function W(){(De===Vt.New||De===Vt.Listening)&&(De=Vt.Closed,on.fire(void 0))}function B(v){vt.fire([v,void 0,void 0])}function ne(v){vt.fire(v)}n.onClose(W),n.onError(B),e.onClose(W),e.onError(ne);function se(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function Ae(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function me(){return"not-"+(++s).toString()}function Ye(v,O){ae.Message.isRequest(O)?v.set(se(O.id),O):ae.Message.isResponse(O)?l===-1?v.set(Ae(O.id),O):rr(O):v.set(me(),O)}function qt(){j||U.size===0||l!==-1&&f>=l||(j=(0,lh.default)().timer.setImmediate(async()=>{if(j=void 0,U.size===0||l!==-1&&f>=l)return;let v=U.shift(),O;try{f++;let A=r?.messageStrategy;Ko.is(A)?O=A.handleMessage(v,Kr):O=Kr(v)}catch(A){i.error(`Processing message queue failed: ${A.toString()}`)}finally{O instanceof Promise?O.then(()=>{f--,qt()}).catch(A=>{i.error(`Processing message queue failed: ${A.toString()}`)}):f--,qt()}}))}async function Kr(v){return ae.Message.isRequest(v)?nr(v):ae.Message.isNotification(v)?ji(v):ae.Message.isResponse(v)?rr(v):Br(v)}let tr=v=>{try{if(ae.Message.isNotification(v)&&v.method===Ui.type.method){let O=v.params.id,A=se(O),Q=U.get(A);if(ae.Message.isRequest(Q)){let _e=r?.connectionStrategy,ye=_e&&_e.cancelUndispatched?_e.cancelUndispatched(Q,P):void 0;if(ye&&(ye.error!==void 0||ye.result!==void 0)){U.delete(A),Y.delete(O),ye.id=Q.id,ir(ye,v.method,Date.now()),e.write(ye).catch(()=>i.error("Sending response for canceled message failed."));return}}let he=Y.get(O);if(he!==void 0){he.cancel(),Mn(v);return}else L.add(O)}Ye(U,v)}finally{qt()}};async function nr(v){if(z())return Promise.resolve();function O(Le,Ve,Re){let xe={jsonrpc:u,id:v.id};return Le instanceof ae.ResponseError?xe.error=Le.toJson():xe.result=Le===void 0?null:Le,ir(xe,Ve,Re),e.write(xe)}function A(Le,Ve,Re){let xe={jsonrpc:u,id:v.id,error:Le.toJson()};return ir(xe,Ve,Re),e.write(xe)}or(v);let Q=p.get(v.method),he,_e;Q&&(he=Q.type,_e=Q.handler);let ye=Date.now();if(_e||h){let Le=v.id??String(Date.now()),Ve=Uo.is(K.receiver)?K.receiver.createCancellationTokenSource(Le):K.receiver.createCancellationTokenSource(v);v.id!==null&&L.has(v.id)&&Ve.cancel(),v.id!==null&&Y.set(Le,Ve);try{let Re;if(_e)if(v.params===void 0){if(he!==void 0&&he.numberOfParams!==0)return A(new ae.ResponseError(ae.ErrorCodes.InvalidParams,`Request ${v.method} defines ${he.numberOfParams} params but received none.`),v.method,ye);Re=_e(Ve.token)}else if(Array.isArray(v.params)){if(he!==void 0&&he.parameterStructures===ae.ParameterStructures.byName)return A(new ae.ResponseError(ae.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,ye);Re=_e(...v.params,Ve.token)}else{if(he!==void 0&&he.parameterStructures===ae.ParameterStructures.byPosition)return A(new ae.ResponseError(ae.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,ye);Re=_e(v.params,Ve.token)}else h&&(Re=h(v.method,v.params,Ve.token));let xe=await Re;await O(xe,v.method,ye)}catch(Re){Re instanceof ae.ResponseError?await O(Re,v.method,ye):Re&&Ue.string(Re.message)?await A(new ae.ResponseError(ae.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${Re.message}`),v.method,ye):await A(new ae.ResponseError(ae.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,ye)}finally{Y.delete(Le)}}else await A(new ae.ResponseError(ae.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,ye)}function rr(v){if(!z())if(v.id===null)v.error?i.error(`Received response message without id: Error is:
|
|
6
|
+
${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let O=v.id,A=E.get(O);if(Vr(v,A),A!==void 0){E.delete(O);try{if(v.error){let Q=v.error;A.reject(new ae.ResponseError(Q.code,Q.message,Q.data))}else if(v.result!==void 0)A.resolve(v.result);else throw new Error("Should never happen.")}catch(Q){Q.message?i.error(`Response handler '${A.method}' failed with message: ${Q.message}`):i.error(`Response handler '${A.method}' failed unexpectedly.`)}}}}async function ji(v){if(z())return;let O,A;if(v.method===Ui.type.method){let Q=v.params.id;L.delete(Q),Mn(v);return}else{let Q=b.get(v.method);Q&&(A=Q.handler,O=Q.type)}if(A||m)try{if(Mn(v),A)if(v.params===void 0)O!==void 0&&O.numberOfParams!==0&&O.parameterStructures!==ae.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${O.numberOfParams} params but received none.`),await A();else if(Array.isArray(v.params)){let Q=v.params;v.method===Li.type.method&&Q.length===2&&ac.is(Q[0])?await A({token:Q[0],value:Q[1]}):(O!==void 0&&(O.parameterStructures===ae.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),O.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${O.numberOfParams} params but received ${Q.length} arguments`)),await A(...Q))}else O!==void 0&&O.parameterStructures===ae.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),await A(v.params);else m&&await m(v.method,v.params)}catch(Q){Q.message?i.error(`Notification handler '${v.method}' failed with message: ${Q.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else H.fire(v)}function Br(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
7
|
+
${JSON.stringify(v,null,4)}`);let O=v;if(Ue.string(O.id)||Ue.number(O.id)){let A=O.id,Q=E.get(A);Q&&Q.reject(new Error("The received response has neither a result nor an error property."))}}function xt(v){if(v!=null)switch(k){case Ce.Verbose:return JSON.stringify(v,null,4);case Ce.Compact:return JSON.stringify(v);default:return}}function Fi(v){if(!(k===Ce.Off||!ue))if(le===Et.Text){let O;(k===Ce.Verbose||k===Ce.Compact)&&v.params&&(O=`Params: ${xt(v.params)}`),ue.log(`Sending request '${v.method} - (${v.id})'.`,O)}else at("send-request",v)}function sn(v){if(!(k===Ce.Off||!ue))if(le===Et.Text){let O;(k===Ce.Verbose||k===Ce.Compact)&&(v.params?O=`Params: ${xt(v.params)}`:O="No parameters provided."),ue.log(`Sending notification '${v.method}'.`,O)}else at("send-notification",v)}function ir(v,O,A){if(!(k===Ce.Off||!ue))if(le===Et.Text){let Q;(k===Ce.Verbose||k===Ce.Compact)&&(v.error&&v.error.data?Q=`Error data: ${xt(v.error.data)}`:v.result?Q=`Result: ${xt(v.result)}`:v.error===void 0&&(Q="No result returned.")),ue.log(`Sending response '${O} - (${v.id})'. Processing request took ${Date.now()-A}ms`,Q)}else at("send-response",v)}function or(v){if(!(k===Ce.Off||!ue))if(le===Et.Text){let O;(k===Ce.Verbose||k===Ce.Compact)&&v.params&&(O=`Params: ${xt(v.params)}`),ue.log(`Received request '${v.method} - (${v.id})'.`,O)}else at("receive-request",v)}function Mn(v){if(!(k===Ce.Off||!ue||v.method===Ho.type.method))if(le===Et.Text){let O;(k===Ce.Verbose||k===Ce.Compact)&&(v.params?O=`Params: ${xt(v.params)}`:O="No parameters provided."),ue.log(`Received notification '${v.method}'.`,O)}else at("receive-notification",v)}function Vr(v,O){if(!(k===Ce.Off||!ue))if(le===Et.Text){let A;if((k===Ce.Verbose||k===Ce.Compact)&&(v.error&&v.error.data?A=`Error data: ${xt(v.error.data)}`:v.result?A=`Result: ${xt(v.result)}`:v.error===void 0&&(A="No result returned.")),O){let Q=v.error?` Request failed: ${v.error.message} (${v.error.code}).`:"";ue.log(`Received response '${O.method} - (${v.id})' in ${Date.now()-O.timerStart}ms.${Q}`,A)}else ue.log(`Received response ${v.id} without active response promise.`,A)}else at("receive-response",v)}function at(v,O){if(!ue||k===Ce.Off)return;let A={isLSPMessage:!0,type:v,message:O,timestamp:Date.now()};ue.log(A)}function Bt(){if(I())throw new ti(Hi.Closed,"Connection is closed.");if(z())throw new ti(Hi.Disposed,"Connection is disposed.")}function ct(){if(M())throw new ti(Hi.AlreadyListening,"Connection is already listening")}function Ii(){if(!M())throw new Error("Call listen() first.")}function ot(v){return v===void 0?null:v}function En(v){if(v!==null)return v}function Gr(v){return v!=null&&!Array.isArray(v)&&typeof v=="object"}function Tr(v,O){switch(v){case ae.ParameterStructures.auto:return Gr(O)?En(O):[ot(O)];case ae.ParameterStructures.byName:if(!Gr(O))throw new Error("Received parameters by name but param is not an object literal.");return En(O);case ae.ParameterStructures.byPosition:return[ot(O)];default:throw new Error(`Unknown parameter structure ${v.toString()}`)}}function sr(v,O){let A,Q=v.numberOfParams;switch(Q){case 0:A=void 0;break;case 1:A=Tr(v.parameterStructures,O[0]);break;default:A=[];for(let he=0;he<O.length&&he<Q;he++)A.push(ot(O[he]));if(O.length<Q)for(let he=O.length;he<Q;he++)A.push(null);break}return A}let At={sendNotification:(v,...O)=>{Bt();let A,Q;if(Ue.string(v)){A=v;let _e=O[0],ye=0,Le=ae.ParameterStructures.auto;ae.ParameterStructures.is(_e)&&(ye=1,Le=_e);let Ve=O.length,Re=Ve-ye;switch(Re){case 0:Q=void 0;break;case 1:Q=Tr(Le,O[ye]);break;default:if(Le===ae.ParameterStructures.byName)throw new Error(`Received ${Re} parameters for 'by Name' notification parameter structure.`);Q=O.slice(ye,Ve).map(xe=>ot(xe));break}}else{let _e=O;A=v.method,Q=sr(v,_e)}let he={jsonrpc:u,method:A,params:Q};return sn(he),e.write(he).catch(_e=>{throw i.error("Sending notification failed."),_e})},onNotification:(v,O)=>{Bt();let A;return Ue.func(v)?m=v:O&&(Ue.string(v)?(A=v,b.set(v,{type:void 0,handler:O})):(A=v.method,b.set(v.method,{type:v,handler:O}))),{dispose:()=>{A!==void 0?b.get(A)?.handler===O&&b.delete(A):m===v&&(m=void 0)}}},onProgress:(v,O,A)=>{if(C.has(O))throw new Error(`Progress handler for token ${O} already registered`);return C.set(O,A),{dispose:()=>{C.get(O)===A&&C.delete(O)}}},sendProgress:(v,O,A)=>At.sendNotification(Li.type,{token:O,value:A}),onUnhandledProgress:R.event,sendRequest:(v,...O)=>{Bt(),Ii();function A(xe,ut){let _t=K.sender.sendCancellation(xe,ut);_t===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${ut}`):_t.catch(()=>{i.log(`Sending cancellation messages for id ${ut} failed.`)})}let Q,he,_e;if(Ue.string(v)){Q=v;let xe=O[0],ut=O[O.length-1],_t=0,jn=ae.ParameterStructures.auto;ae.ParameterStructures.is(xe)&&(_t=1,jn=xe);let Mt=O.length;sc.CancellationToken.is(ut)&&(Mt=Mt-1,_e=ut);let bt=Mt-_t;switch(bt){case 0:he=void 0;break;case 1:he=Tr(jn,O[_t]);break;default:if(jn===ae.ParameterStructures.byName)throw new Error(`Received ${bt} parameters for 'by Name' request parameter structure.`);he=O.slice(_t,Mt).map(Jr=>ot(Jr));break}}else{let xe=O;Q=v.method,he=sr(v,xe);let ut=v.numberOfParams;_e=sc.CancellationToken.is(xe[ut])?xe[ut]:void 0}let ye=o++,Le,Ve=!1;_e!==void 0&&(_e.isCancellationRequested?Ve=!0:Le=_e.onCancellationRequested(()=>{A(At,ye)}));let Re={jsonrpc:u,id:ye,method:Q,params:he};return Fi(Re),typeof K.sender.enableCancellation=="function"&&K.sender.enableCancellation(Re),new Promise(async(xe,ut)=>{let _t=bt=>{xe(bt),K.sender.cleanup(ye),Le?.dispose()},jn=bt=>{ut(bt),K.sender.cleanup(ye),Le?.dispose()},Mt={method:Q,timerStart:Date.now(),resolve:_t,reject:jn};try{E.set(ye,Mt),await e.write(Re),Ve&&A(At,ye)}catch(bt){throw E.delete(ye),Mt.reject(new ae.ResponseError(ae.ErrorCodes.MessageWriteError,bt.message?bt.message:"Unknown reason")),i.error("Sending request failed."),bt}})},onRequest:(v,O)=>{Bt();let A=null;return uc.is(v)?(A=void 0,h=v):Ue.string(v)?(A=null,O!==void 0&&(A=v,p.set(v,{handler:O,type:void 0}))):O!==void 0&&(A=v.method,p.set(v.method,{type:v,handler:O})),{dispose:()=>{A!==null&&(A!==void 0?p.get(A)?.handler===O&&p.delete(A):h===v&&(h=void 0))}}},hasPendingResponse:()=>E.size>0,trace:async(v,O,A)=>{let Q=!1,he=Et.Text;A!==void 0&&(Ue.boolean(A)?Q=A:(Q=A.sendNotification||!1,he=A.traceFormat||Et.Text)),k=v,le=he,k===Ce.Off?ue=void 0:ue=O,Q&&!I()&&!z()&&await At.sendNotification(dc.type,{value:Ce.toString(v)})},onError:vt.event,onClose:on.event,onUnhandledNotification:H.event,onDispose:V.event,end:()=>{e.end()},dispose:()=>{if(z())return;De=Vt.Disposed,V.fire(void 0);let v=new ae.ResponseError(ae.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let O of E.values())O.reject(v);E=new Map,Y=new Map,L=new Set,U=new dh.LinkedMap,Ue.func(e.dispose)&&e.dispose(),Ue.func(n.dispose)&&n.dispose()},listen:()=>{Bt(),ct(),De=Vt.Listening,n.listen(tr)},inspect:()=>{(0,lh.default)().console.log("inspect")}};return At.onNotification(Ho.type,v=>{if(k===Ce.Off||!ue)return;let O=k===Ce.Verbose||k===Ce.Compact;ue.log(v.message,O?v.verbose:void 0)}),At.onNotification(Li.type,async v=>{let O=C.get(v.token);O?await O(v.value):R.fire(v)}),At}});var kn=F(S=>{"use strict";y();var T_=S&&S.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(S,"__esModule",{value:!0});S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.AbstractMessageBuffer=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.SharedArrayReceiverStrategy=S.SharedArraySenderStrategy=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.MessageStrategy=S.CancellationStrategy=S.CancellationSenderStrategy=S.RequestCancellationReceiverStrategy=S.IdCancellationReceiverStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=S.SetTraceNotification=S.TraceFormat=S.TraceValues=S.TraceValue=S.Trace=void 0;var Me=ka();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return Me.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return Me.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return Me.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return Me.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return Me.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return Me.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return Me.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return Me.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return Me.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return Me.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return Me.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return Me.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return Me.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return Me.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return Me.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return Me.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return Me.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return Me.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return Me.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return Me.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return Me.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return Me.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return Me.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return Me.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return Me.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return Me.ParameterStructures}});var pc=La();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return pc.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return pc.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return pc.Touch}});var O_=Yf();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return O_.Disposable}});var ph=Xr();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return ph.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return ph.Emitter}});var gh=No();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return gh.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return gh.CancellationToken}});var mh=th();Object.defineProperty(S,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return mh.SharedArraySenderStrategy}});Object.defineProperty(S,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return mh.SharedArrayReceiverStrategy}});var gc=rh();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return gc.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return gc.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return gc.ReadableStreamMessageReader}});var mc=ch();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return mc.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return mc.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return mc.WriteableStreamMessageWriter}});var q_=uh();Object.defineProperty(S,"AbstractMessageBuffer",{enumerable:!0,get:function(){return q_.AbstractMessageBuffer}});var Je=hh();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return Je.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return Je.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return Je.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return Je.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return Je.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return Je.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return Je.Trace}});Object.defineProperty(S,"TraceValue",{enumerable:!0,get:function(){return Je.TraceValue}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return Je.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return Je.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return Je.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return Je.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return Je.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Je.CancellationReceiverStrategy}});Object.defineProperty(S,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return Je.IdCancellationReceiverStrategy}});Object.defineProperty(S,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return Je.RequestCancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Je.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return Je.CancellationStrategy}});Object.defineProperty(S,"MessageStrategy",{enumerable:!0,get:function(){return Je.MessageStrategy}});Object.defineProperty(S,"TraceValues",{enumerable:!0,get:function(){return Je.TraceValues}});var x_=T_(lr());S.RAL=x_.default});var ns={};Vf(ns,{AnnotatedTextEdit:()=>An,ApplyKind:()=>Ac,ChangeAnnotation:()=>fr,ChangeAnnotationIdentifier:()=>et,CodeAction:()=>eu,CodeActionContext:()=>Yc,CodeActionKind:()=>Zc,CodeActionTag:()=>Zo,CodeActionTriggerKind:()=>Gi,CodeDescription:()=>Rc,CodeLens:()=>tu,Color:()=>Vo,ColorInformation:()=>bc,ColorPresentation:()=>Cc,Command:()=>xr,CompletionItem:()=>Hc,CompletionItemKind:()=>jc,CompletionItemLabelDetails:()=>Lc,CompletionItemTag:()=>Ic,CompletionList:()=>Uc,CreateFile:()=>ri,DeleteFile:()=>oi,Diagnostic:()=>zi,DiagnosticRelatedInformation:()=>Go,DiagnosticSeverity:()=>Sc,DiagnosticTag:()=>Pc,DocumentHighlight:()=>Bc,DocumentHighlightKind:()=>Kc,DocumentLink:()=>ru,DocumentSymbol:()=>Xc,DocumentUri:()=>yc,EOL:()=>M_,FoldingRange:()=>Dc,FoldingRangeKind:()=>wc,FormattingOptions:()=>nu,Hover:()=>Wc,InlayHint:()=>fu,InlayHintKind:()=>Yo,InlayHintLabelPart:()=>es,InlineCompletionContext:()=>yu,InlineCompletionItem:()=>hu,InlineCompletionList:()=>pu,InlineCompletionTriggerKind:()=>gu,InlineValueContext:()=>du,InlineValueEvaluatableExpression:()=>lu,InlineValueText:()=>cu,InlineValueVariableLookup:()=>uu,InsertReplaceEdit:()=>Nc,InsertTextFormat:()=>Fc,InsertTextMode:()=>kc,LanguageKind:()=>Mc,Location:()=>$i,LocationLink:()=>_c,MarkedString:()=>Vi,MarkupContent:()=>si,MarkupKind:()=>Xo,OptionalVersionedTextDocumentIdentifier:()=>Bi,ParameterInformation:()=>$c,Position:()=>Ht,Range:()=>We,RenameFile:()=>ii,SelectedCompletionInfo:()=>mu,SelectionRange:()=>iu,SemanticTokenModifiers:()=>su,SemanticTokenTypes:()=>ou,SemanticTokens:()=>au,SignatureInformation:()=>zc,SnippetTextEdit:()=>Tc,StringValue:()=>ts,SymbolInformation:()=>Jc,SymbolKind:()=>Vc,SymbolTag:()=>Gc,TextDocument:()=>_u,TextDocumentEdit:()=>Ki,TextDocumentIdentifier:()=>qc,TextDocumentItem:()=>Ec,TextEdit:()=>an,URI:()=>Bo,VersionedTextDocumentIdentifier:()=>xc,WorkspaceChange:()=>Oc,WorkspaceEdit:()=>Jo,WorkspaceFolder:()=>vu,WorkspaceSymbol:()=>Qc,integer:()=>vc,uinteger:()=>Wi});var yc,Bo,vc,Wi,Ht,We,$i,_c,Vo,bc,Cc,wc,Dc,Go,Sc,Pc,Rc,zi,xr,an,fr,et,An,Ki,ri,ii,oi,Jo,ni,Tc,Qo,Oc,qc,xc,Bi,Mc,Ec,Xo,si,jc,Fc,Ic,Nc,kc,Ac,Lc,Hc,Uc,Vi,Wc,$c,zc,Kc,Bc,Vc,Gc,Jc,Qc,Xc,Zc,Gi,Yc,Zo,eu,tu,nu,ru,iu,ou,su,au,cu,uu,lu,du,Yo,es,fu,ts,hu,pu,gu,mu,yu,vu,M_,_u,bu,w,rs=Bf(()=>{"use strict";y();(function(n){function e(t){return typeof t=="string"}n.is=e})(yc||(yc={}));(function(n){function e(t){return typeof t=="string"}n.is=e})(Bo||(Bo={}));(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(vc||(vc={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Wi||(Wi={}));(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Wi.MAX_VALUE),i===Number.MAX_VALUE&&(i=Wi.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&w.uinteger(i.line)&&w.uinteger(i.character)}n.is=t})(Ht||(Ht={}));(function(n){function e(r,i,o,s){if(w.uinteger(r)&&w.uinteger(i)&&w.uinteger(o)&&w.uinteger(s))return{start:Ht.create(r,i),end:Ht.create(o,s)};if(Ht.is(r)&&Ht.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&Ht.is(i.start)&&Ht.is(i.end)}n.is=t})(We||(We={}));(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&We.is(i.range)&&(w.string(i.uri)||w.undefined(i.uri))}n.is=t})($i||($i={}));(function(n){function e(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&We.is(i.targetRange)&&w.string(i.targetUri)&&We.is(i.targetSelectionRange)&&(We.is(i.originSelectionRange)||w.undefined(i.originSelectionRange))}n.is=t})(_c||(_c={}));(function(n){function e(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&w.numberRange(i.red,0,1)&&w.numberRange(i.green,0,1)&&w.numberRange(i.blue,0,1)&&w.numberRange(i.alpha,0,1)}n.is=t})(Vo||(Vo={}));(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&We.is(i.range)&&Vo.is(i.color)}n.is=t})(bc||(bc={}));(function(n){function e(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&w.string(i.label)&&(w.undefined(i.textEdit)||an.is(i))&&(w.undefined(i.additionalTextEdits)||w.typedArray(i.additionalTextEdits,an.is))}n.is=t})(Cc||(Cc={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(wc||(wc={}));(function(n){function e(r,i,o,s,a,u){let l={startLine:r,endLine:i};return w.defined(o)&&(l.startCharacter=o),w.defined(s)&&(l.endCharacter=s),w.defined(a)&&(l.kind=a),w.defined(u)&&(l.collapsedText=u),l}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&w.uinteger(i.startLine)&&w.uinteger(i.startLine)&&(w.undefined(i.startCharacter)||w.uinteger(i.startCharacter))&&(w.undefined(i.endCharacter)||w.uinteger(i.endCharacter))&&(w.undefined(i.kind)||w.string(i.kind))}n.is=t})(Dc||(Dc={}));(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return w.defined(i)&&$i.is(i.location)&&w.string(i.message)}n.is=t})(Go||(Go={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Sc||(Sc={}));(function(n){n.Unnecessary=1,n.Deprecated=2})(Pc||(Pc={}));(function(n){function e(t){let r=t;return w.objectLiteral(r)&&w.string(r.href)}n.is=e})(Rc||(Rc={}));(function(n){function e(r,i,o,s,a,u){let l={range:r,message:i};return w.defined(o)&&(l.severity=o),w.defined(s)&&(l.code=s),w.defined(a)&&(l.source=a),w.defined(u)&&(l.relatedInformation=u),l}n.create=e;function t(r){var i;let o=r;return w.defined(o)&&We.is(o.range)&&w.string(o.message)&&(w.number(o.severity)||w.undefined(o.severity))&&(w.integer(o.code)||w.string(o.code)||w.undefined(o.code))&&(w.undefined(o.codeDescription)||w.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(w.string(o.source)||w.undefined(o.source))&&(w.undefined(o.relatedInformation)||w.typedArray(o.relatedInformation,Go.is))}n.is=t})(zi||(zi={}));(function(n){function e(r,i,...o){let s={title:r,command:i};return w.defined(o)&&o.length>0&&(s.arguments=o),s}n.create=e;function t(r){let i=r;return w.defined(i)&&w.string(i.title)&&(i.tooltip===void 0||w.string(i.tooltip))&&w.string(i.command)}n.is=t})(xr||(xr={}));(function(n){function e(o,s){return{range:o,newText:s}}n.replace=e;function t(o,s){return{range:{start:o,end:o},newText:s}}n.insert=t;function r(o){return{range:o,newText:""}}n.del=r;function i(o){let s=o;return w.objectLiteral(s)&&w.string(s.newText)&&We.is(s.range)}n.is=i})(an||(an={}));(function(n){function e(r,i,o){let s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&w.string(i.label)&&(w.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(w.string(i.description)||i.description===void 0)}n.is=t})(fr||(fr={}));(function(n){function e(t){let r=t;return w.string(r)}n.is=e})(et||(et={}));(function(n){function e(o,s,a){return{range:o,newText:s,annotationId:a}}n.replace=e;function t(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}n.insert=t;function r(o,s){return{range:o,newText:"",annotationId:s}}n.del=r;function i(o){let s=o;return an.is(s)&&(fr.is(s.annotationId)||et.is(s.annotationId))}n.is=i})(An||(An={}));(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return w.defined(i)&&Bi.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(Ki||(Ki={}));(function(n){function e(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&w.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||w.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||w.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||et.is(i.annotationId))}n.is=t})(ri||(ri={}));(function(n){function e(r,i,o,s){let a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&w.string(i.oldUri)&&w.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||w.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||w.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||et.is(i.annotationId))}n.is=t})(ii||(ii={}));(function(n){function e(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&w.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||w.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||w.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||et.is(i.annotationId))}n.is=t})(oi||(oi={}));(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>w.string(i.kind)?ri.is(i)||ii.is(i)||oi.is(i):Ki.is(i)))}n.is=e})(Jo||(Jo={}));ni=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,o;if(r===void 0?i=an.insert(e,t):et.is(r)?(o=r,i=An.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=An.insert(e,t,o)),this.edits.push(i),o!==void 0)return o}replace(e,t,r){let i,o;if(r===void 0?i=an.replace(e,t):et.is(r)?(o=r,i=An.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=An.replace(e,t,o)),this.edits.push(i),o!==void 0)return o}delete(e,t){let r,i;if(t===void 0?r=an.del(e):et.is(t)?(i=t,r=An.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=An.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(n){function e(t){let r=t;return w.objectLiteral(r)&&We.is(r.range)&&ts.isSnippet(r.snippet)&&(r.annotationId===void 0||fr.is(r.annotationId)||et.is(r.annotationId))}n.is=e})(Tc||(Tc={}));Qo=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(et.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Oc=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Qo(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Ki.is(t)){let r=new ni(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new ni(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Bi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let i=[],o={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(o),r=new ni(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ni(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Qo,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;fr.is(t)||et.is(t)?i=t:r=t;let o,s;if(i===void 0?o=ri.create(e,r):(s=et.is(i)?i:this._changeAnnotations.manage(i),o=ri.create(e,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}renameFile(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;fr.is(r)||et.is(r)?o=r:i=r;let s,a;if(o===void 0?s=ii.create(e,t,i):(a=et.is(o)?o:this._changeAnnotations.manage(o),s=ii.create(e,t,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;fr.is(t)||et.is(t)?i=t:r=t;let o,s;if(i===void 0?o=oi.create(e,r):(s=et.is(i)?i:this._changeAnnotations.manage(i),o=oi.create(e,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}};(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return w.defined(i)&&w.string(i.uri)}n.is=t})(qc||(qc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return w.defined(i)&&w.string(i.uri)&&w.integer(i.version)}n.is=t})(xc||(xc={}));(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return w.defined(i)&&w.string(i.uri)&&(i.version===null||w.integer(i.version))}n.is=t})(Bi||(Bi={}));(function(n){n.ABAP="abap",n.WindowsBat="bat",n.BibTeX="bibtex",n.Clojure="clojure",n.Coffeescript="coffeescript",n.C="c",n.CPP="cpp",n.CSharp="csharp",n.CSS="css",n.D="d",n.Delphi="pascal",n.Diff="diff",n.Dart="dart",n.Dockerfile="dockerfile",n.Elixir="elixir",n.Erlang="erlang",n.FSharp="fsharp",n.GitCommit="git-commit",n.GitRebase="rebase",n.Go="go",n.Groovy="groovy",n.Handlebars="handlebars",n.Haskell="haskell",n.HTML="html",n.Ini="ini",n.Java="java",n.JavaScript="javascript",n.JavaScriptReact="javascriptreact",n.JSON="json",n.LaTeX="latex",n.Less="less",n.Lua="lua",n.Makefile="makefile",n.Markdown="markdown",n.ObjectiveC="objective-c",n.ObjectiveCPP="objective-cpp",n.Pascal="pascal",n.Perl="perl",n.Perl6="perl6",n.PHP="php",n.Powershell="powershell",n.Pug="jade",n.Python="python",n.R="r",n.Razor="razor",n.Ruby="ruby",n.Rust="rust",n.SCSS="scss",n.SASS="sass",n.Scala="scala",n.ShaderLab="shaderlab",n.ShellScript="shellscript",n.SQL="sql",n.Swift="swift",n.TypeScript="typescript",n.TypeScriptReact="typescriptreact",n.TeX="tex",n.VisualBasic="vb",n.XML="xml",n.XSL="xsl",n.YAML="yaml"})(Mc||(Mc={}));(function(n){function e(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}n.create=e;function t(r){let i=r;return w.defined(i)&&w.string(i.uri)&&w.string(i.languageId)&&w.integer(i.version)&&w.string(i.text)}n.is=t})(Ec||(Ec={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){let r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(Xo||(Xo={}));(function(n){function e(t){let r=t;return w.objectLiteral(t)&&Xo.is(r.kind)&&w.string(r.value)}n.is=e})(si||(si={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(jc||(jc={}));(function(n){n.PlainText=1,n.Snippet=2})(Fc||(Fc={}));(function(n){n.Deprecated=1})(Ic||(Ic={}));(function(n){function e(r,i,o){return{newText:r,insert:i,replace:o}}n.create=e;function t(r){let i=r;return i&&w.string(i.newText)&&We.is(i.insert)&&We.is(i.replace)}n.is=t})(Nc||(Nc={}));(function(n){n.asIs=1,n.adjustIndentation=2})(kc||(kc={}));(function(n){n.Replace=1,n.Merge=2})(Ac||(Ac={}));(function(n){function e(t){let r=t;return r&&(w.string(r.detail)||r.detail===void 0)&&(w.string(r.description)||r.description===void 0)}n.is=e})(Lc||(Lc={}));(function(n){function e(t){return{label:t}}n.create=e})(Hc||(Hc={}));(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(Uc||(Uc={}));(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){let i=r;return w.string(i)||w.objectLiteral(i)&&w.string(i.language)&&w.string(i.value)}n.is=t})(Vi||(Vi={}));(function(n){function e(t){let r=t;return!!r&&w.objectLiteral(r)&&(si.is(r.contents)||Vi.is(r.contents)||w.typedArray(r.contents,Vi.is))&&(t.range===void 0||We.is(t.range))}n.is=e})(Wc||(Wc={}));(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})($c||($c={}));(function(n){function e(t,r,...i){let o={label:t};return w.defined(r)&&(o.documentation=r),w.defined(i)?o.parameters=i:o.parameters=[],o}n.create=e})(zc||(zc={}));(function(n){n.Text=1,n.Read=2,n.Write=3})(Kc||(Kc={}));(function(n){function e(t,r){let i={range:t};return w.number(r)&&(i.kind=r),i}n.create=e})(Bc||(Bc={}));(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(Vc||(Vc={}));(function(n){n.Deprecated=1})(Gc||(Gc={}));(function(n){function e(t,r,i,o,s){let a={name:t,kind:r,location:{uri:o,range:i}};return s&&(a.containerName=s),a}n.create=e})(Jc||(Jc={}));(function(n){function e(t,r,i,o){return o!==void 0?{name:t,kind:r,location:{uri:i,range:o}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(Qc||(Qc={}));(function(n){function e(r,i,o,s,a,u){let l={name:r,detail:i,kind:o,range:s,selectionRange:a};return u!==void 0&&(l.children=u),l}n.create=e;function t(r){let i=r;return i&&w.string(i.name)&&w.number(i.kind)&&We.is(i.range)&&We.is(i.selectionRange)&&(i.detail===void 0||w.string(i.detail))&&(i.deprecated===void 0||w.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(Xc||(Xc={}));(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorMove="refactor.move",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll",n.Notebook="notebook"})(Zc||(Zc={}));(function(n){n.Invoked=1,n.Automatic=2})(Gi||(Gi={}));(function(n){function e(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}n.create=e;function t(r){let i=r;return w.defined(i)&&w.typedArray(i.diagnostics,zi.is)&&(i.only===void 0||w.typedArray(i.only,w.string))&&(i.triggerKind===void 0||i.triggerKind===Gi.Invoked||i.triggerKind===Gi.Automatic)}n.is=t})(Yc||(Yc={}));(function(n){n.LLMGenerated=1;function e(t){return w.defined(t)&&t===n.LLMGenerated}n.is=e})(Zo||(Zo={}));(function(n){function e(r,i,o){let s={title:r},a=!0;return typeof i=="string"?(a=!1,s.kind=i):xr.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}n.create=e;function t(r){let i=r;return i&&w.string(i.title)&&(i.diagnostics===void 0||w.typedArray(i.diagnostics,zi.is))&&(i.kind===void 0||w.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||xr.is(i.command))&&(i.isPreferred===void 0||w.boolean(i.isPreferred))&&(i.edit===void 0||Jo.is(i.edit))&&(i.tags===void 0||w.typedArray(i.tags,Zo.is))}n.is=t})(eu||(eu={}));(function(n){function e(r,i){let o={range:r};return w.defined(i)&&(o.data=i),o}n.create=e;function t(r){let i=r;return w.defined(i)&&We.is(i.range)&&(w.undefined(i.command)||xr.is(i.command))}n.is=t})(tu||(tu={}));(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return w.defined(i)&&w.uinteger(i.tabSize)&&w.boolean(i.insertSpaces)}n.is=t})(nu||(nu={}));(function(n){function e(r,i,o){return{range:r,target:i,data:o}}n.create=e;function t(r){let i=r;return w.defined(i)&&We.is(i.range)&&(w.undefined(i.target)||w.string(i.target))}n.is=t})(ru||(ru={}));(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&We.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(iu||(iu={}));(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator",n.label="label"})(ou||(ou={}));(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(su||(su={}));(function(n){function e(t){let r=t;return w.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(au||(au={}));(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){let i=r;return i!=null&&We.is(i.range)&&w.string(i.text)}n.is=t})(cu||(cu={}));(function(n){function e(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}n.create=e;function t(r){let i=r;return i!=null&&We.is(i.range)&&w.boolean(i.caseSensitiveLookup)&&(w.string(i.variableName)||i.variableName===void 0)}n.is=t})(uu||(uu={}));(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){let i=r;return i!=null&&We.is(i.range)&&(w.string(i.expression)||i.expression===void 0)}n.is=t})(lu||(lu={}));(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){let i=r;return w.defined(i)&&We.is(r.stoppedLocation)}n.is=t})(du||(du={}));(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(Yo||(Yo={}));(function(n){function e(r){return{value:r}}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&(i.tooltip===void 0||w.string(i.tooltip)||si.is(i.tooltip))&&(i.location===void 0||$i.is(i.location))&&(i.command===void 0||xr.is(i.command))}n.is=t})(es||(es={}));(function(n){function e(r,i,o){let s={position:r,label:i};return o!==void 0&&(s.kind=o),s}n.create=e;function t(r){let i=r;return w.objectLiteral(i)&&Ht.is(i.position)&&(w.string(i.label)||w.typedArray(i.label,es.is))&&(i.kind===void 0||Yo.is(i.kind))&&i.textEdits===void 0||w.typedArray(i.textEdits,an.is)&&(i.tooltip===void 0||w.string(i.tooltip)||si.is(i.tooltip))&&(i.paddingLeft===void 0||w.boolean(i.paddingLeft))&&(i.paddingRight===void 0||w.boolean(i.paddingRight))}n.is=t})(fu||(fu={}));(function(n){function e(r){return{kind:"snippet",value:r}}n.createSnippet=e;function t(r){let i=r;return w.objectLiteral(i)&&i.kind==="snippet"&&w.string(i.value)}n.isSnippet=t})(ts||(ts={}));(function(n){function e(t,r,i,o){return{insertText:t,filterText:r,range:i,command:o}}n.create=e})(hu||(hu={}));(function(n){function e(t){return{items:t}}n.create=e})(pu||(pu={}));(function(n){n.Invoked=1,n.Automatic=2})(gu||(gu={}));(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(mu||(mu={}));(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(yu||(yu={}));(function(n){function e(t){let r=t;return w.objectLiteral(r)&&Bo.is(r.uri)&&w.string(r.name)}n.is=e})(vu||(vu={}));M_=[`
|
|
8
|
+
`,`\r
|
|
9
|
+
`,"\r"];(function(n){function e(o,s,a,u){return new bu(o,s,a,u)}n.create=e;function t(o){let s=o;return!!(w.defined(s)&&w.string(s.uri)&&(w.undefined(s.languageId)||w.string(s.languageId))&&w.uinteger(s.lineCount)&&w.func(s.getText)&&w.func(s.positionAt)&&w.func(s.offsetAt))}n.is=t;function r(o,s){let a=o.getText(),u=i(s,(f,h)=>{let p=f.range.start.line-h.range.start.line;return p===0?f.range.start.character-h.range.start.character:p}),l=a.length;for(let f=u.length-1;f>=0;f--){let h=u[f],p=o.offsetAt(h.range.start),m=o.offsetAt(h.range.end);if(m<=l)a=a.substring(0,p)+h.newText+a.substring(m,a.length);else throw new Error("Overlapping edit");l=p}return a}n.applyEdits=r;function i(o,s){if(o.length<=1)return o;let a=o.length/2|0,u=o.slice(0,a),l=o.slice(a);i(u,s),i(l,s);let f=0,h=0,p=0;for(;f<u.length&&h<l.length;)s(u[f],l[h])<=0?o[p++]=u[f++]:o[p++]=l[h++];for(;f<u.length;)o[p++]=u[f++];for(;h<l.length;)o[p++]=l[h++];return o}})(_u||(_u={}));bu=class{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,r=!0;for(let i=0;i<t.length;i++){r&&(e.push(i),r=!1);let o=t.charAt(i);r=o==="\r"||o===`
|
|
10
|
+
`,o==="\r"&&i+1<t.length&&t.charAt(i+1)===`
|
|
11
|
+
`&&i++}r&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return Ht.create(0,e);for(;r<i;){let s=Math.floor((r+i)/2);t[s]>e?i=s:r=s+1}let o=r-1;return Ht.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(n){let e=Object.prototype.toString;function t(m){return typeof m<"u"}n.defined=t;function r(m){return typeof m>"u"}n.undefined=r;function i(m){return m===!0||m===!1}n.boolean=i;function o(m){return e.call(m)==="[object String]"}n.string=o;function s(m){return e.call(m)==="[object Number]"}n.number=s;function a(m,b,C){return e.call(m)==="[object Number]"&&b<=m&&m<=C}n.numberRange=a;function u(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}n.integer=u;function l(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}n.uinteger=l;function f(m){return e.call(m)==="[object Function]"}n.func=f;function h(m){return m!==null&&typeof m=="object"}n.objectLiteral=h;function p(m,b){return Array.isArray(m)&&m.every(b)}n.typedArray=p})(w||(w={}))});var je=F(ht=>{"use strict";y();Object.defineProperty(ht,"__esModule",{value:!0});ht.CM=ht.ProtocolNotificationType=ht.ProtocolNotificationType0=ht.ProtocolRequestType=ht.ProtocolRequestType0=ht.RegistrationType=ht.MessageDirection=void 0;var ai=kn(),yh;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(yh||(ht.MessageDirection=yh={}));var Cu=class{____;method;constructor(e){this.method=e}};ht.RegistrationType=Cu;var wu=class extends ai.RequestType0{__;___;____;_pr;constructor(e){super(e)}};ht.ProtocolRequestType0=wu;var Du=class extends ai.RequestType{__;___;____;_pr;constructor(e){super(e,ai.ParameterStructures.byName)}};ht.ProtocolRequestType=Du;var Su=class extends ai.NotificationType0{___;____;constructor(e){super(e)}};ht.ProtocolNotificationType0=Su;var Pu=class extends ai.NotificationType{___;____;constructor(e){super(e,ai.ParameterStructures.byName)}};ht.ProtocolNotificationType=Pu;var vh;(function(n){function e(t,r){return{client:t,server:r}}n.create=e})(vh||(ht.CM=vh={}))});var is=F(Gt=>{"use strict";y();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.boolean=E_;Gt.string=_h;Gt.number=j_;Gt.error=F_;Gt.func=I_;Gt.array=bh;Gt.stringArray=N_;Gt.typedArray=k_;Gt.objectLiteral=A_;function E_(n){return n===!0||n===!1}function _h(n){return typeof n=="string"||n instanceof String}function j_(n){return typeof n=="number"||n instanceof Number}function F_(n){return n instanceof Error}function I_(n){return typeof n=="function"}function bh(n){return Array.isArray(n)}function N_(n){return bh(n)&&n.every(e=>_h(e))}function k_(n,e){return Array.isArray(n)&&n.every(e)}function A_(n){return n!==null&&typeof n=="object"}});var wh=F(os=>{"use strict";y();Object.defineProperty(os,"__esModule",{value:!0});os.ImplementationRequest=void 0;var Ru=je(),Ch;(function(n){n.method="textDocument/implementation",n.messageDirection=Ru.MessageDirection.clientToServer,n.type=new Ru.ProtocolRequestType(n.method),n.capabilities=Ru.CM.create("textDocument.implementation","implementationProvider")})(Ch||(os.ImplementationRequest=Ch={}))});var Sh=F(ss=>{"use strict";y();Object.defineProperty(ss,"__esModule",{value:!0});ss.TypeDefinitionRequest=void 0;var Tu=je(),Dh;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=Tu.MessageDirection.clientToServer,n.type=new Tu.ProtocolRequestType(n.method),n.capabilities=Tu.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(Dh||(ss.TypeDefinitionRequest=Dh={}))});var Th=F(ui=>{"use strict";y();Object.defineProperty(ui,"__esModule",{value:!0});ui.DidChangeWorkspaceFoldersNotification=ui.WorkspaceFoldersRequest=void 0;var ci=je(),Ph;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=ci.MessageDirection.serverToClient,n.type=new ci.ProtocolRequestType0(n.method),n.capabilities=ci.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Ph||(ui.WorkspaceFoldersRequest=Ph={}));var Rh;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=ci.MessageDirection.clientToServer,n.type=new ci.ProtocolNotificationType(n.method),n.capabilities=ci.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Rh||(ui.DidChangeWorkspaceFoldersNotification=Rh={}))});var qh=F(as=>{"use strict";y();Object.defineProperty(as,"__esModule",{value:!0});as.ConfigurationRequest=void 0;var Ou=je(),Oh;(function(n){n.method="workspace/configuration",n.messageDirection=Ou.MessageDirection.serverToClient,n.type=new Ou.ProtocolRequestType(n.method),n.capabilities=Ou.CM.create("workspace.configuration",void 0)})(Oh||(as.ConfigurationRequest=Oh={}))});var Eh=F(di=>{"use strict";y();Object.defineProperty(di,"__esModule",{value:!0});di.ColorPresentationRequest=di.DocumentColorRequest=void 0;var li=je(),xh;(function(n){n.method="textDocument/documentColor",n.messageDirection=li.MessageDirection.clientToServer,n.type=new li.ProtocolRequestType(n.method),n.capabilities=li.CM.create("textDocument.colorProvider","colorProvider")})(xh||(di.DocumentColorRequest=xh={}));var Mh;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=li.MessageDirection.clientToServer,n.type=new li.ProtocolRequestType(n.method),n.capabilities=li.CM.create("textDocument.colorProvider","colorProvider")})(Mh||(di.ColorPresentationRequest=Mh={}))});var Ih=F(hi=>{"use strict";y();Object.defineProperty(hi,"__esModule",{value:!0});hi.FoldingRangeRefreshRequest=hi.FoldingRangeRequest=void 0;var fi=je(),jh;(function(n){n.method="textDocument/foldingRange",n.messageDirection=fi.MessageDirection.clientToServer,n.type=new fi.ProtocolRequestType(n.method),n.capabilities=fi.CM.create("textDocument.foldingRange","foldingRangeProvider")})(jh||(hi.FoldingRangeRequest=jh={}));var Fh;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=fi.MessageDirection.serverToClient,n.type=new fi.ProtocolRequestType0(n.method),n.capabilities=fi.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Fh||(hi.FoldingRangeRefreshRequest=Fh={}))});var kh=F(cs=>{"use strict";y();Object.defineProperty(cs,"__esModule",{value:!0});cs.DeclarationRequest=void 0;var qu=je(),Nh;(function(n){n.method="textDocument/declaration",n.messageDirection=qu.MessageDirection.clientToServer,n.type=new qu.ProtocolRequestType(n.method),n.capabilities=qu.CM.create("textDocument.declaration","declarationProvider")})(Nh||(cs.DeclarationRequest=Nh={}))});var Lh=F(us=>{"use strict";y();Object.defineProperty(us,"__esModule",{value:!0});us.SelectionRangeRequest=void 0;var xu=je(),Ah;(function(n){n.method="textDocument/selectionRange",n.messageDirection=xu.MessageDirection.clientToServer,n.type=new xu.ProtocolRequestType(n.method),n.capabilities=xu.CM.create("textDocument.selectionRange","selectionRangeProvider")})(Ah||(us.SelectionRangeRequest=Ah={}))});var $h=F(hr=>{"use strict";y();Object.defineProperty(hr,"__esModule",{value:!0});hr.WorkDoneProgressCancelNotification=hr.WorkDoneProgressCreateRequest=hr.WorkDoneProgress=void 0;var L_=kn(),Ji=je(),Hh;(function(n){n.type=new L_.ProgressType;function e(t){return t===n.type}n.is=e})(Hh||(hr.WorkDoneProgress=Hh={}));var Uh;(function(n){n.method="window/workDoneProgress/create",n.messageDirection=Ji.MessageDirection.serverToClient,n.type=new Ji.ProtocolRequestType(n.method),n.capabilities=Ji.CM.create("window.workDoneProgress",void 0)})(Uh||(hr.WorkDoneProgressCreateRequest=Uh={}));var Wh;(function(n){n.method="window/workDoneProgress/cancel",n.messageDirection=Ji.MessageDirection.clientToServer,n.type=new Ji.ProtocolNotificationType(n.method)})(Wh||(hr.WorkDoneProgressCancelNotification=Wh={}))});var Vh=F(pr=>{"use strict";y();Object.defineProperty(pr,"__esModule",{value:!0});pr.CallHierarchyOutgoingCallsRequest=pr.CallHierarchyIncomingCallsRequest=pr.CallHierarchyPrepareRequest=void 0;var Mr=je(),zh;(function(n){n.method="textDocument/prepareCallHierarchy",n.messageDirection=Mr.MessageDirection.clientToServer,n.type=new Mr.ProtocolRequestType(n.method),n.capabilities=Mr.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(zh||(pr.CallHierarchyPrepareRequest=zh={}));var Kh;(function(n){n.method="callHierarchy/incomingCalls",n.messageDirection=Mr.MessageDirection.clientToServer,n.type=new Mr.ProtocolRequestType(n.method)})(Kh||(pr.CallHierarchyIncomingCallsRequest=Kh={}));var Bh;(function(n){n.method="callHierarchy/outgoingCalls",n.messageDirection=Mr.MessageDirection.clientToServer,n.type=new Mr.ProtocolRequestType(n.method)})(Bh||(pr.CallHierarchyOutgoingCallsRequest=Bh={}))});var Yh=F(Dt=>{"use strict";y();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.SemanticTokensRefreshRequest=Dt.SemanticTokensRangeRequest=Dt.SemanticTokensDeltaRequest=Dt.SemanticTokensRequest=Dt.SemanticTokensRegistrationType=Dt.TokenFormat=void 0;var jt=je(),Gh;(function(n){n.Relative="relative"})(Gh||(Dt.TokenFormat=Gh={}));var Qi;(function(n){n.method="textDocument/semanticTokens",n.type=new jt.RegistrationType(n.method)})(Qi||(Dt.SemanticTokensRegistrationType=Qi={}));var Jh;(function(n){n.method="textDocument/semanticTokens/full",n.messageDirection=jt.MessageDirection.clientToServer,n.type=new jt.ProtocolRequestType(n.method),n.registrationMethod=Qi.method,n.capabilities=jt.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(Jh||(Dt.SemanticTokensRequest=Jh={}));var Qh;(function(n){n.method="textDocument/semanticTokens/full/delta",n.messageDirection=jt.MessageDirection.clientToServer,n.type=new jt.ProtocolRequestType(n.method),n.registrationMethod=Qi.method,n.capabilities=jt.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(Qh||(Dt.SemanticTokensDeltaRequest=Qh={}));var Xh;(function(n){n.method="textDocument/semanticTokens/range",n.messageDirection=jt.MessageDirection.clientToServer,n.type=new jt.ProtocolRequestType(n.method),n.registrationMethod=Qi.method,n.capabilities=jt.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(Xh||(Dt.SemanticTokensRangeRequest=Xh={}));var Zh;(function(n){n.method="workspace/semanticTokens/refresh",n.messageDirection=jt.MessageDirection.serverToClient,n.type=new jt.ProtocolRequestType0(n.method),n.capabilities=jt.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(Zh||(Dt.SemanticTokensRefreshRequest=Zh={}))});var tp=F(ls=>{"use strict";y();Object.defineProperty(ls,"__esModule",{value:!0});ls.ShowDocumentRequest=void 0;var Mu=je(),ep;(function(n){n.method="window/showDocument",n.messageDirection=Mu.MessageDirection.serverToClient,n.type=new Mu.ProtocolRequestType(n.method),n.capabilities=Mu.CM.create("window.showDocument.support",void 0)})(ep||(ls.ShowDocumentRequest=ep={}))});var rp=F(ds=>{"use strict";y();Object.defineProperty(ds,"__esModule",{value:!0});ds.LinkedEditingRangeRequest=void 0;var Eu=je(),np;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=Eu.MessageDirection.clientToServer,n.type=new Eu.ProtocolRequestType(n.method),n.capabilities=Eu.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(np||(ds.LinkedEditingRangeRequest=np={}))});var dp=F(pt=>{"use strict";y();Object.defineProperty(pt,"__esModule",{value:!0});pt.WillDeleteFilesRequest=pt.DidDeleteFilesNotification=pt.DidRenameFilesNotification=pt.WillRenameFilesRequest=pt.DidCreateFilesNotification=pt.WillCreateFilesRequest=pt.FileOperationPatternKind=void 0;var tt=je(),ip;(function(n){n.file="file",n.folder="folder"})(ip||(pt.FileOperationPatternKind=ip={}));var op;(function(n){n.method="workspace/willCreateFiles",n.messageDirection=tt.MessageDirection.clientToServer,n.type=new tt.ProtocolRequestType(n.method),n.capabilities=tt.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(op||(pt.WillCreateFilesRequest=op={}));var sp;(function(n){n.method="workspace/didCreateFiles",n.messageDirection=tt.MessageDirection.clientToServer,n.type=new tt.ProtocolNotificationType(n.method),n.capabilities=tt.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(sp||(pt.DidCreateFilesNotification=sp={}));var ap;(function(n){n.method="workspace/willRenameFiles",n.messageDirection=tt.MessageDirection.clientToServer,n.type=new tt.ProtocolRequestType(n.method),n.capabilities=tt.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(ap||(pt.WillRenameFilesRequest=ap={}));var cp;(function(n){n.method="workspace/didRenameFiles",n.messageDirection=tt.MessageDirection.clientToServer,n.type=new tt.ProtocolNotificationType(n.method),n.capabilities=tt.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(cp||(pt.DidRenameFilesNotification=cp={}));var up;(function(n){n.method="workspace/didDeleteFiles",n.messageDirection=tt.MessageDirection.clientToServer,n.type=new tt.ProtocolNotificationType(n.method),n.capabilities=tt.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(up||(pt.DidDeleteFilesNotification=up={}));var lp;(function(n){n.method="workspace/willDeleteFiles",n.messageDirection=tt.MessageDirection.clientToServer,n.type=new tt.ProtocolRequestType(n.method),n.capabilities=tt.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(lp||(pt.WillDeleteFilesRequest=lp={}))});var gp=F(gr=>{"use strict";y();Object.defineProperty(gr,"__esModule",{value:!0});gr.MonikerRequest=gr.MonikerKind=gr.UniquenessLevel=void 0;var ju=je(),fp;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(fp||(gr.UniquenessLevel=fp={}));var hp;(function(n){n.$import="import",n.$export="export",n.local="local"})(hp||(gr.MonikerKind=hp={}));var pp;(function(n){n.method="textDocument/moniker",n.messageDirection=ju.MessageDirection.clientToServer,n.type=new ju.ProtocolRequestType(n.method),n.capabilities=ju.CM.create("textDocument.moniker","monikerProvider")})(pp||(gr.MonikerRequest=pp={}))});var _p=F(mr=>{"use strict";y();Object.defineProperty(mr,"__esModule",{value:!0});mr.TypeHierarchySubtypesRequest=mr.TypeHierarchySupertypesRequest=mr.TypeHierarchyPrepareRequest=void 0;var Er=je(),mp;(function(n){n.method="textDocument/prepareTypeHierarchy",n.messageDirection=Er.MessageDirection.clientToServer,n.type=new Er.ProtocolRequestType(n.method),n.capabilities=Er.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(mp||(mr.TypeHierarchyPrepareRequest=mp={}));var yp;(function(n){n.method="typeHierarchy/supertypes",n.messageDirection=Er.MessageDirection.clientToServer,n.type=new Er.ProtocolRequestType(n.method)})(yp||(mr.TypeHierarchySupertypesRequest=yp={}));var vp;(function(n){n.method="typeHierarchy/subtypes",n.messageDirection=Er.MessageDirection.clientToServer,n.type=new Er.ProtocolRequestType(n.method)})(vp||(mr.TypeHierarchySubtypesRequest=vp={}))});var wp=F(gi=>{"use strict";y();Object.defineProperty(gi,"__esModule",{value:!0});gi.InlineValueRefreshRequest=gi.InlineValueRequest=void 0;var pi=je(),bp;(function(n){n.method="textDocument/inlineValue",n.messageDirection=pi.MessageDirection.clientToServer,n.type=new pi.ProtocolRequestType(n.method),n.capabilities=pi.CM.create("textDocument.inlineValue","inlineValueProvider")})(bp||(gi.InlineValueRequest=bp={}));var Cp;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=pi.MessageDirection.serverToClient,n.type=new pi.ProtocolRequestType0(n.method),n.capabilities=pi.CM.create("workspace.inlineValue.refreshSupport",void 0)})(Cp||(gi.InlineValueRefreshRequest=Cp={}))});var Rp=F(yr=>{"use strict";y();Object.defineProperty(yr,"__esModule",{value:!0});yr.InlayHintRefreshRequest=yr.InlayHintResolveRequest=yr.InlayHintRequest=void 0;var Ln=je(),Dp;(function(n){n.method="textDocument/inlayHint",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint","inlayHintProvider")})(Dp||(yr.InlayHintRequest=Dp={}));var Sp;(function(n){n.method="inlayHint/resolve",n.messageDirection=Ln.MessageDirection.clientToServer,n.type=new Ln.ProtocolRequestType(n.method),n.capabilities=Ln.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Sp||(yr.InlayHintResolveRequest=Sp={}));var Pp;(function(n){n.method="workspace/inlayHint/refresh",n.messageDirection=Ln.MessageDirection.serverToClient,n.type=new Ln.ProtocolRequestType0(n.method),n.capabilities=Ln.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Pp||(yr.InlayHintRefreshRequest=Pp={}))});var jp=F(nt=>{"use strict";y();var H_=nt&&nt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),U_=nt&&nt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),W_=nt&&nt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&H_(t,e,r[i]);return U_(t,e),t}})();Object.defineProperty(nt,"__esModule",{value:!0});nt.DiagnosticRefreshRequest=nt.WorkspaceDiagnosticRequest=nt.DocumentDiagnosticRequest=nt.DocumentDiagnosticReportKind=nt.DiagnosticServerCancellationData=void 0;var Ep=kn(),$_=W_(is()),Hn=je(),Tp;(function(n){function e(t){let r=t;return r&&$_.boolean(r.retriggerRequest)}n.is=e})(Tp||(nt.DiagnosticServerCancellationData=Tp={}));var Op;(function(n){n.Full="full",n.Unchanged="unchanged"})(Op||(nt.DocumentDiagnosticReportKind=Op={}));var qp;(function(n){n.method="textDocument/diagnostic",n.messageDirection=Hn.MessageDirection.clientToServer,n.type=new Hn.ProtocolRequestType(n.method),n.partialResult=new Ep.ProgressType,n.capabilities=Hn.CM.create("textDocument.diagnostic","diagnosticProvider")})(qp||(nt.DocumentDiagnosticRequest=qp={}));var xp;(function(n){n.method="workspace/diagnostic",n.messageDirection=Hn.MessageDirection.clientToServer,n.type=new Hn.ProtocolRequestType(n.method),n.partialResult=new Ep.ProgressType,n.capabilities=Hn.CM.create("workspace.diagnostics","diagnosticProvider.workspaceDiagnostics")})(xp||(nt.WorkspaceDiagnosticRequest=xp={}));var Mp;(function(n){n.method="workspace/diagnostic/refresh",n.messageDirection=Hn.MessageDirection.serverToClient,n.type=new Hn.ProtocolRequestType0(n.method),n.capabilities=Hn.CM.create("workspace.diagnostics.refreshSupport",void 0)})(Mp||(nt.DiagnosticRefreshRequest=Mp={}))});var Hp=F(Se=>{"use strict";y();var z_=Se&&Se.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),K_=Se&&Se.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),B_=Se&&Se.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&z_(t,e,r[i]);return K_(t,e),t}})();Object.defineProperty(Se,"__esModule",{value:!0});Se.DidCloseNotebookDocumentNotification=Se.DidSaveNotebookDocumentNotification=Se.DidChangeNotebookDocumentNotification=Se.NotebookCellArrayChange=Se.DidOpenNotebookDocumentNotification=Se.NotebookDocumentSyncRegistrationType=Se.NotebookDocument=Se.NotebookCell=Se.ExecutionSummary=Se.NotebookCellKind=void 0;var Xi=(rs(),Mo(ns)),Jt=B_(is()),cn=je(),Fu;(function(n){n.Markup=1,n.Code=2;function e(t){return t===1||t===2}n.is=e})(Fu||(Se.NotebookCellKind=Fu={}));var Iu;(function(n){function e(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}n.create=e;function t(i){let o=i;return Jt.objectLiteral(o)&&Xi.uinteger.is(o.executionOrder)&&(o.success===void 0||Jt.boolean(o.success))}n.is=t;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}n.equals=r})(Iu||(Se.ExecutionSummary=Iu={}));var fs;(function(n){function e(o,s){return{kind:o,document:s}}n.create=e;function t(o){let s=o;return Jt.objectLiteral(s)&&Fu.is(s.kind)&&Xi.DocumentUri.is(s.document)&&(s.metadata===void 0||Jt.objectLiteral(s.metadata))}n.is=t;function r(o,s){let a=new Set;return o.document!==s.document&&a.add("document"),o.kind!==s.kind&&a.add("kind"),o.executionSummary!==s.executionSummary&&a.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&a.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!Iu.equals(o.executionSummary,s.executionSummary)&&a.add("executionSummary"),a}n.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let a=Array.isArray(o),u=Array.isArray(s);if(a!==u)return!1;if(a&&u){if(o.length!==s.length)return!1;for(let l=0;l<o.length;l++)if(!i(o[l],s[l]))return!1}if(Jt.objectLiteral(o)&&Jt.objectLiteral(s)){let l=Object.keys(o),f=Object.keys(s);if(l.length!==f.length||(l.sort(),f.sort(),!i(l,f)))return!1;for(let h=0;h<l.length;h++){let p=l[h];if(!i(o[p],s[p]))return!1}}return!0}})(fs||(Se.NotebookCell=fs={}));var Fp;(function(n){function e(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}n.create=e;function t(r){let i=r;return Jt.objectLiteral(i)&&Jt.string(i.uri)&&Xi.integer.is(i.version)&&Jt.typedArray(i.cells,fs.is)}n.is=t})(Fp||(Se.NotebookDocument=Fp={}));var mi;(function(n){n.method="notebookDocument/sync",n.messageDirection=cn.MessageDirection.clientToServer,n.type=new cn.RegistrationType(n.method)})(mi||(Se.NotebookDocumentSyncRegistrationType=mi={}));var Ip;(function(n){n.method="notebookDocument/didOpen",n.messageDirection=cn.MessageDirection.clientToServer,n.type=new cn.ProtocolNotificationType(n.method),n.registrationMethod=mi.method})(Ip||(Se.DidOpenNotebookDocumentNotification=Ip={}));var Np;(function(n){function e(r){let i=r;return Jt.objectLiteral(i)&&Xi.uinteger.is(i.start)&&Xi.uinteger.is(i.deleteCount)&&(i.cells===void 0||Jt.typedArray(i.cells,fs.is))}n.is=e;function t(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}n.create=t})(Np||(Se.NotebookCellArrayChange=Np={}));var kp;(function(n){n.method="notebookDocument/didChange",n.messageDirection=cn.MessageDirection.clientToServer,n.type=new cn.ProtocolNotificationType(n.method),n.registrationMethod=mi.method})(kp||(Se.DidChangeNotebookDocumentNotification=kp={}));var Ap;(function(n){n.method="notebookDocument/didSave",n.messageDirection=cn.MessageDirection.clientToServer,n.type=new cn.ProtocolNotificationType(n.method),n.registrationMethod=mi.method})(Ap||(Se.DidSaveNotebookDocumentNotification=Ap={}));var Lp;(function(n){n.method="notebookDocument/didClose",n.messageDirection=cn.MessageDirection.clientToServer,n.type=new cn.ProtocolNotificationType(n.method),n.registrationMethod=mi.method})(Lp||(Se.DidCloseNotebookDocumentNotification=Lp={}))});var Wp=F(hs=>{"use strict";y();Object.defineProperty(hs,"__esModule",{value:!0});hs.InlineCompletionRequest=void 0;var Nu=je(),Up;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=Nu.MessageDirection.clientToServer,n.type=new Nu.ProtocolRequestType(n.method),n.capabilities=Nu.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Up||(hs.InlineCompletionRequest=Up={}))});var Kp=F(yi=>{"use strict";y();Object.defineProperty(yi,"__esModule",{value:!0});yi.TextDocumentContentRefreshRequest=yi.TextDocumentContentRequest=void 0;var Zi=je(),$p;(function(n){n.method="workspace/textDocumentContent",n.messageDirection=Zi.MessageDirection.clientToServer,n.type=new Zi.ProtocolRequestType(n.method),n.capabilities=Zi.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})($p||(yi.TextDocumentContentRequest=$p={}));var zp;(function(n){n.method="workspace/textDocumentContent/refresh",n.messageDirection=Zi.MessageDirection.serverToClient,n.type=new Zi.ProtocolRequestType(n.method)})(zp||(yi.TextDocumentContentRefreshRequest=zp={}))});var om=F(g=>{"use strict";y();var V_=g&&g.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),G_=g&&g.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),J_=g&&g.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&V_(t,e,r[i]);return G_(t,e),t}})();Object.defineProperty(g,"__esModule",{value:!0});g.CodeActionRequest=g.DocumentSymbolRequest=g.DocumentHighlightRequest=g.ReferencesRequest=g.DefinitionRequest=g.SignatureHelpRequest=g.SignatureHelpTriggerKind=g.HoverRequest=g.CompletionResolveRequest=g.CompletionRequest=g.CompletionTriggerKind=g.PublishDiagnosticsNotification=g.WatchKind=g.GlobPattern=g.RelativePattern=g.FileChangeType=g.DidChangeWatchedFilesNotification=g.WillSaveTextDocumentWaitUntilRequest=g.WillSaveTextDocumentNotification=g.TextDocumentSaveReason=g.DidSaveTextDocumentNotification=g.DidCloseTextDocumentNotification=g.DidChangeTextDocumentNotification=g.TextDocumentContentChangeEvent=g.DidOpenTextDocumentNotification=g.TextDocumentSyncKind=g.TelemetryEventNotification=g.LogMessageNotification=g.ShowMessageRequest=g.ShowMessageNotification=g.MessageType=g.DidChangeConfigurationNotification=g.ExitNotification=g.ShutdownRequest=g.InitializedNotification=g.InitializeErrorCodes=g.InitializeRequest=g.WorkDoneProgressOptions=g.TextDocumentRegistrationOptions=g.StaticRegistrationOptions=g.PositionEncodingKind=g.RegularExpressionEngineKind=g.FailureHandlingKind=g.ResourceOperationKind=g.UnregistrationRequest=g.RegistrationRequest=g.DocumentSelector=g.NotebookCellTextDocumentFilter=g.NotebookDocumentFilter=g.TextDocumentFilter=void 0;g.UniquenessLevel=g.WillDeleteFilesRequest=g.DidDeleteFilesNotification=g.WillRenameFilesRequest=g.DidRenameFilesNotification=g.WillCreateFilesRequest=g.DidCreateFilesNotification=g.FileOperationPatternKind=g.LinkedEditingRangeRequest=g.ShowDocumentRequest=g.SemanticTokensRegistrationType=g.SemanticTokensRefreshRequest=g.SemanticTokensRangeRequest=g.SemanticTokensDeltaRequest=g.SemanticTokensRequest=g.TokenFormat=g.CallHierarchyPrepareRequest=g.CallHierarchyOutgoingCallsRequest=g.CallHierarchyIncomingCallsRequest=g.WorkDoneProgressCancelNotification=g.WorkDoneProgressCreateRequest=g.WorkDoneProgress=g.SelectionRangeRequest=g.DeclarationRequest=g.FoldingRangeRefreshRequest=g.FoldingRangeRequest=g.ColorPresentationRequest=g.DocumentColorRequest=g.ConfigurationRequest=g.DidChangeWorkspaceFoldersNotification=g.WorkspaceFoldersRequest=g.TypeDefinitionRequest=g.ImplementationRequest=g.ApplyWorkspaceEditRequest=g.ExecuteCommandRequest=g.PrepareRenameRequest=g.RenameRequest=g.PrepareSupportDefaultBehavior=g.DocumentOnTypeFormattingRequest=g.DocumentRangesFormattingRequest=g.DocumentRangeFormattingRequest=g.DocumentFormattingRequest=g.DocumentLinkResolveRequest=g.DocumentLinkRequest=g.CodeLensRefreshRequest=g.CodeLensResolveRequest=g.CodeLensRequest=g.WorkspaceSymbolResolveRequest=g.WorkspaceSymbolRequest=g.CodeActionResolveRequest=void 0;g.TextDocumentContentRefreshRequest=g.TextDocumentContentRequest=g.InlineCompletionRequest=g.DidCloseNotebookDocumentNotification=g.DidSaveNotebookDocumentNotification=g.DidChangeNotebookDocumentNotification=g.NotebookCellArrayChange=g.DidOpenNotebookDocumentNotification=g.NotebookDocumentSyncRegistrationType=g.NotebookDocument=g.NotebookCell=g.ExecutionSummary=g.NotebookCellKind=g.DiagnosticRefreshRequest=g.WorkspaceDiagnosticRequest=g.DocumentDiagnosticRequest=g.DocumentDiagnosticReportKind=g.DiagnosticServerCancellationData=g.InlayHintRefreshRequest=g.InlayHintResolveRequest=g.InlayHintRequest=g.InlineValueRefreshRequest=g.InlineValueRequest=g.TypeHierarchySupertypesRequest=g.TypeHierarchySubtypesRequest=g.TypeHierarchyPrepareRequest=g.MonikerRequest=g.MonikerKind=void 0;var T=je(),Bp=(rs(),Mo(ns)),rt=J_(is()),Q_=wh();Object.defineProperty(g,"ImplementationRequest",{enumerable:!0,get:function(){return Q_.ImplementationRequest}});var X_=Sh();Object.defineProperty(g,"TypeDefinitionRequest",{enumerable:!0,get:function(){return X_.TypeDefinitionRequest}});var em=Th();Object.defineProperty(g,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return em.WorkspaceFoldersRequest}});Object.defineProperty(g,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return em.DidChangeWorkspaceFoldersNotification}});var Z_=qh();Object.defineProperty(g,"ConfigurationRequest",{enumerable:!0,get:function(){return Z_.ConfigurationRequest}});var tm=Eh();Object.defineProperty(g,"DocumentColorRequest",{enumerable:!0,get:function(){return tm.DocumentColorRequest}});Object.defineProperty(g,"ColorPresentationRequest",{enumerable:!0,get:function(){return tm.ColorPresentationRequest}});var nm=Ih();Object.defineProperty(g,"FoldingRangeRequest",{enumerable:!0,get:function(){return nm.FoldingRangeRequest}});Object.defineProperty(g,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return nm.FoldingRangeRefreshRequest}});var Y_=kh();Object.defineProperty(g,"DeclarationRequest",{enumerable:!0,get:function(){return Y_.DeclarationRequest}});var eb=Lh();Object.defineProperty(g,"SelectionRangeRequest",{enumerable:!0,get:function(){return eb.SelectionRangeRequest}});var $u=$h();Object.defineProperty(g,"WorkDoneProgress",{enumerable:!0,get:function(){return $u.WorkDoneProgress}});Object.defineProperty(g,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return $u.WorkDoneProgressCreateRequest}});Object.defineProperty(g,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return $u.WorkDoneProgressCancelNotification}});var zu=Vh();Object.defineProperty(g,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return zu.CallHierarchyIncomingCallsRequest}});Object.defineProperty(g,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return zu.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(g,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return zu.CallHierarchyPrepareRequest}});var vi=Yh();Object.defineProperty(g,"TokenFormat",{enumerable:!0,get:function(){return vi.TokenFormat}});Object.defineProperty(g,"SemanticTokensRequest",{enumerable:!0,get:function(){return vi.SemanticTokensRequest}});Object.defineProperty(g,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return vi.SemanticTokensDeltaRequest}});Object.defineProperty(g,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return vi.SemanticTokensRangeRequest}});Object.defineProperty(g,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return vi.SemanticTokensRefreshRequest}});Object.defineProperty(g,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return vi.SemanticTokensRegistrationType}});var tb=tp();Object.defineProperty(g,"ShowDocumentRequest",{enumerable:!0,get:function(){return tb.ShowDocumentRequest}});var nb=rp();Object.defineProperty(g,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return nb.LinkedEditingRangeRequest}});var jr=dp();Object.defineProperty(g,"FileOperationPatternKind",{enumerable:!0,get:function(){return jr.FileOperationPatternKind}});Object.defineProperty(g,"DidCreateFilesNotification",{enumerable:!0,get:function(){return jr.DidCreateFilesNotification}});Object.defineProperty(g,"WillCreateFilesRequest",{enumerable:!0,get:function(){return jr.WillCreateFilesRequest}});Object.defineProperty(g,"DidRenameFilesNotification",{enumerable:!0,get:function(){return jr.DidRenameFilesNotification}});Object.defineProperty(g,"WillRenameFilesRequest",{enumerable:!0,get:function(){return jr.WillRenameFilesRequest}});Object.defineProperty(g,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return jr.DidDeleteFilesNotification}});Object.defineProperty(g,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return jr.WillDeleteFilesRequest}});var Ku=gp();Object.defineProperty(g,"UniquenessLevel",{enumerable:!0,get:function(){return Ku.UniquenessLevel}});Object.defineProperty(g,"MonikerKind",{enumerable:!0,get:function(){return Ku.MonikerKind}});Object.defineProperty(g,"MonikerRequest",{enumerable:!0,get:function(){return Ku.MonikerRequest}});var Bu=_p();Object.defineProperty(g,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Bu.TypeHierarchyPrepareRequest}});Object.defineProperty(g,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Bu.TypeHierarchySubtypesRequest}});Object.defineProperty(g,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Bu.TypeHierarchySupertypesRequest}});var rm=wp();Object.defineProperty(g,"InlineValueRequest",{enumerable:!0,get:function(){return rm.InlineValueRequest}});Object.defineProperty(g,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return rm.InlineValueRefreshRequest}});var Vu=Rp();Object.defineProperty(g,"InlayHintRequest",{enumerable:!0,get:function(){return Vu.InlayHintRequest}});Object.defineProperty(g,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Vu.InlayHintResolveRequest}});Object.defineProperty(g,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Vu.InlayHintRefreshRequest}});var Yi=jp();Object.defineProperty(g,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Yi.DiagnosticServerCancellationData}});Object.defineProperty(g,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Yi.DocumentDiagnosticReportKind}});Object.defineProperty(g,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Yi.DocumentDiagnosticRequest}});Object.defineProperty(g,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Yi.WorkspaceDiagnosticRequest}});Object.defineProperty(g,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Yi.DiagnosticRefreshRequest}});var un=Hp();Object.defineProperty(g,"NotebookCellKind",{enumerable:!0,get:function(){return un.NotebookCellKind}});Object.defineProperty(g,"ExecutionSummary",{enumerable:!0,get:function(){return un.ExecutionSummary}});Object.defineProperty(g,"NotebookCell",{enumerable:!0,get:function(){return un.NotebookCell}});Object.defineProperty(g,"NotebookDocument",{enumerable:!0,get:function(){return un.NotebookDocument}});Object.defineProperty(g,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return un.NotebookDocumentSyncRegistrationType}});Object.defineProperty(g,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return un.DidOpenNotebookDocumentNotification}});Object.defineProperty(g,"NotebookCellArrayChange",{enumerable:!0,get:function(){return un.NotebookCellArrayChange}});Object.defineProperty(g,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return un.DidChangeNotebookDocumentNotification}});Object.defineProperty(g,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return un.DidSaveNotebookDocumentNotification}});Object.defineProperty(g,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return un.DidCloseNotebookDocumentNotification}});var rb=Wp();Object.defineProperty(g,"InlineCompletionRequest",{enumerable:!0,get:function(){return rb.InlineCompletionRequest}});var im=Kp();Object.defineProperty(g,"TextDocumentContentRequest",{enumerable:!0,get:function(){return im.TextDocumentContentRequest}});Object.defineProperty(g,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return im.TextDocumentContentRefreshRequest}});var ku;(function(n){function e(t){let r=t;return rt.string(r)||rt.string(r.language)||rt.string(r.scheme)||Wu.is(r.pattern)}n.is=e})(ku||(g.TextDocumentFilter=ku={}));var Au;(function(n){function e(t){let r=t;return rt.objectLiteral(r)&&(rt.string(r.notebookType)||rt.string(r.scheme)||rt.string(r.pattern))}n.is=e})(Au||(g.NotebookDocumentFilter=Au={}));var Lu;(function(n){function e(t){let r=t;return rt.objectLiteral(r)&&(rt.string(r.notebook)||Au.is(r.notebook))&&(r.language===void 0||rt.string(r.language))}n.is=e})(Lu||(g.NotebookCellTextDocumentFilter=Lu={}));var Hu;(function(n){function e(t){if(!Array.isArray(t))return!1;for(let r of t)if(!rt.string(r)&&!ku.is(r)&&!Lu.is(r))return!1;return!0}n.is=e})(Hu||(g.DocumentSelector=Hu={}));var Vp;(function(n){n.method="client/registerCapability",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolRequestType(n.method)})(Vp||(g.RegistrationRequest=Vp={}));var Gp;(function(n){n.method="client/unregisterCapability",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolRequestType(n.method)})(Gp||(g.UnregistrationRequest=Gp={}));var Jp;(function(n){n.Create="create",n.Rename="rename",n.Delete="delete"})(Jp||(g.ResourceOperationKind=Jp={}));var Qp;(function(n){n.Abort="abort",n.Transactional="transactional",n.TextOnlyTransactional="textOnlyTransactional",n.Undo="undo"})(Qp||(g.FailureHandlingKind=Qp={}));var Xp;(function(n){n.ES2020="ES2020"})(Xp||(g.RegularExpressionEngineKind=Xp={}));var Zp;(function(n){n.UTF8="utf-8",n.UTF16="utf-16",n.UTF32="utf-32"})(Zp||(g.PositionEncodingKind=Zp={}));var Yp;(function(n){function e(t){let r=t;return r&&rt.string(r.id)&&r.id.length>0}n.hasId=e})(Yp||(g.StaticRegistrationOptions=Yp={}));var eg;(function(n){function e(t){let r=t;return r&&(r.documentSelector===null||Hu.is(r.documentSelector))}n.is=e})(eg||(g.TextDocumentRegistrationOptions=eg={}));var tg;(function(n){function e(r){let i=r;return rt.objectLiteral(i)&&(i.workDoneProgress===void 0||rt.boolean(i.workDoneProgress))}n.is=e;function t(r){let i=r;return i&&rt.boolean(i.workDoneProgress)}n.hasWorkDoneProgress=t})(tg||(g.WorkDoneProgressOptions=tg={}));var ng;(function(n){n.method="initialize",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method)})(ng||(g.InitializeRequest=ng={}));var rg;(function(n){n.unknownProtocolVersion=1})(rg||(g.InitializeErrorCodes=rg={}));var ig;(function(n){n.method="initialized",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method)})(ig||(g.InitializedNotification=ig={}));var og;(function(n){n.method="shutdown",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType0(n.method)})(og||(g.ShutdownRequest=og={}));var sg;(function(n){n.method="exit",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType0(n.method)})(sg||(g.ExitNotification=sg={}));var ag;(function(n){n.method="workspace/didChangeConfiguration",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("workspace.didChangeConfiguration",void 0)})(ag||(g.DidChangeConfigurationNotification=ag={}));var cg;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4,n.Debug=5})(cg||(g.MessageType=cg={}));var ug;(function(n){n.method="window/showMessage",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("window.showMessage",void 0)})(ug||(g.ShowMessageNotification=ug={}));var lg;(function(n){n.method="window/showMessageRequest",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("window.showMessage",void 0)})(lg||(g.ShowMessageRequest=lg={}));var dg;(function(n){n.method="window/logMessage",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolNotificationType(n.method)})(dg||(g.LogMessageNotification=dg={}));var fg;(function(n){n.method="telemetry/event",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolNotificationType(n.method)})(fg||(g.TelemetryEventNotification=fg={}));var hg;(function(n){n.None=0,n.Full=1,n.Incremental=2})(hg||(g.TextDocumentSyncKind=hg={}));var pg;(function(n){n.method="textDocument/didOpen",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(pg||(g.DidOpenTextDocumentNotification=pg={}));var gg;(function(n){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}n.isIncremental=e;function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}n.isFull=t})(gg||(g.TextDocumentContentChangeEvent=gg={}));var mg;(function(n){n.method="textDocument/didChange",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync")})(mg||(g.DidChangeTextDocumentNotification=mg={}));var yg;(function(n){n.method="textDocument/didClose",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(yg||(g.DidCloseTextDocumentNotification=yg={}));var vg;(function(n){n.method="textDocument/didSave",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(vg||(g.DidSaveTextDocumentNotification=vg={}));var _g;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(_g||(g.TextDocumentSaveReason=_g={}));var bg;(function(n){n.method="textDocument/willSave",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(bg||(g.WillSaveTextDocumentNotification=bg={}));var Cg;(function(n){n.method="textDocument/willSaveWaitUntil",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(Cg||(g.WillSaveTextDocumentWaitUntilRequest=Cg={}));var wg;(function(n){n.method="workspace/didChangeWatchedFiles",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("workspace.didChangeWatchedFiles",void 0)})(wg||(g.DidChangeWatchedFilesNotification=wg={}));var Dg;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(Dg||(g.FileChangeType=Dg={}));var Uu;(function(n){function e(t){let r=t;return rt.objectLiteral(r)&&(Bp.URI.is(r.baseUri)||Bp.WorkspaceFolder.is(r.baseUri))&&rt.string(r.pattern)}n.is=e})(Uu||(g.RelativePattern=Uu={}));var Wu;(function(n){function e(t){let r=t;return rt.string(r)||Uu.is(r)}n.is=e})(Wu||(g.GlobPattern=Wu={}));var Sg;(function(n){n.Create=1,n.Change=2,n.Delete=4})(Sg||(g.WatchKind=Sg={}));var Pg;(function(n){n.method="textDocument/publishDiagnostics",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolNotificationType(n.method),n.capabilities=T.CM.create("textDocument.publishDiagnostics",void 0)})(Pg||(g.PublishDiagnosticsNotification=Pg={}));var Rg;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(Rg||(g.CompletionTriggerKind=Rg={}));var Tg;(function(n){n.method="textDocument/completion",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.completion","completionProvider")})(Tg||(g.CompletionRequest=Tg={}));var Og;(function(n){n.method="completionItem/resolve",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Og||(g.CompletionResolveRequest=Og={}));var qg;(function(n){n.method="textDocument/hover",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.hover","hoverProvider")})(qg||(g.HoverRequest=qg={}));var xg;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(xg||(g.SignatureHelpTriggerKind=xg={}));var Mg;(function(n){n.method="textDocument/signatureHelp",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Mg||(g.SignatureHelpRequest=Mg={}));var Eg;(function(n){n.method="textDocument/definition",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.definition","definitionProvider")})(Eg||(g.DefinitionRequest=Eg={}));var jg;(function(n){n.method="textDocument/references",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.references","referencesProvider")})(jg||(g.ReferencesRequest=jg={}));var Fg;(function(n){n.method="textDocument/documentHighlight",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Fg||(g.DocumentHighlightRequest=Fg={}));var Ig;(function(n){n.method="textDocument/documentSymbol",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Ig||(g.DocumentSymbolRequest=Ig={}));var Ng;(function(n){n.method="textDocument/codeAction",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.codeAction","codeActionProvider")})(Ng||(g.CodeActionRequest=Ng={}));var kg;(function(n){n.method="codeAction/resolve",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(kg||(g.CodeActionResolveRequest=kg={}));var Ag;(function(n){n.method="workspace/symbol",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("workspace.symbol","workspaceSymbolProvider")})(Ag||(g.WorkspaceSymbolRequest=Ag={}));var Lg;(function(n){n.method="workspaceSymbol/resolve",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Lg||(g.WorkspaceSymbolResolveRequest=Lg={}));var Hg;(function(n){n.method="textDocument/codeLens",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.codeLens","codeLensProvider")})(Hg||(g.CodeLensRequest=Hg={}));var Ug;(function(n){n.method="codeLens/resolve",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Ug||(g.CodeLensResolveRequest=Ug={}));var Wg;(function(n){n.method="workspace/codeLens/refresh",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolRequestType0(n.method),n.capabilities=T.CM.create("workspace.codeLens",void 0)})(Wg||(g.CodeLensRefreshRequest=Wg={}));var $g;(function(n){n.method="textDocument/documentLink",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider")})($g||(g.DocumentLinkRequest=$g={}));var zg;(function(n){n.method="documentLink/resolve",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(zg||(g.DocumentLinkResolveRequest=zg={}));var Kg;(function(n){n.method="textDocument/formatting",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.formatting","documentFormattingProvider")})(Kg||(g.DocumentFormattingRequest=Kg={}));var Bg;(function(n){n.method="textDocument/rangeFormatting",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Bg||(g.DocumentRangeFormattingRequest=Bg={}));var Vg;(function(n){n.method="textDocument/rangesFormatting",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Vg||(g.DocumentRangesFormattingRequest=Vg={}));var Gg;(function(n){n.method="textDocument/onTypeFormatting",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Gg||(g.DocumentOnTypeFormattingRequest=Gg={}));var Jg;(function(n){n.Identifier=1})(Jg||(g.PrepareSupportDefaultBehavior=Jg={}));var Qg;(function(n){n.method="textDocument/rename",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.rename","renameProvider")})(Qg||(g.RenameRequest=Qg={}));var Xg;(function(n){n.method="textDocument/prepareRename",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(Xg||(g.PrepareRenameRequest=Xg={}));var Zg;(function(n){n.method="workspace/executeCommand",n.messageDirection=T.MessageDirection.clientToServer,n.type=new T.ProtocolRequestType(n.method),n.capabilities=T.CM.create("workspace.executeCommand","executeCommandProvider")})(Zg||(g.ExecuteCommandRequest=Zg={}));var Yg;(function(n){n.method="workspace/applyEdit",n.messageDirection=T.MessageDirection.serverToClient,n.type=new T.ProtocolRequestType("workspace/applyEdit"),n.capabilities=T.CM.create("workspace.applyEdit",void 0)})(Yg||(g.ApplyWorkspaceEditRequest=Yg={}))});var am=F(Gu=>{"use strict";y();Object.defineProperty(Gu,"__esModule",{value:!0});Gu.createProtocolConnection=ib;var sm=kn();function ib(n,e,t,r){return sm.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,sm.createMessageConnection)(n,e,t,r)}});var oe=F(St=>{"use strict";y();var ob=St&&St.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ps=St&&St.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ob(e,n,t)};Object.defineProperty(St,"__esModule",{value:!0});St.LSPErrorCodes=St.createProtocolConnection=void 0;ps(kn(),St);ps((rs(),Mo(ns)),St);ps(je(),St);ps(om(),St);var sb=am();Object.defineProperty(St,"createProtocolConnection",{enumerable:!0,get:function(){return sb.createProtocolConnection}});var cm;(function(n){n.lspReservedErrorRangeStart=-32899,n.RequestFailed=-32803,n.ServerCancelled=-32802,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(cm||(St.LSPErrorCodes=cm={}))});var Qt=F(Ut=>{"use strict";y();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.boolean=ab;Ut.string=um;Ut.number=cb;Ut.error=ub;Ut.func=lm;Ut.array=dm;Ut.stringArray=lb;Ut.typedArray=db;Ut.thenable=fm;Ut.asPromise=fb;function ab(n){return n===!0||n===!1}function um(n){return typeof n=="string"||n instanceof String}function cb(n){return typeof n=="number"||n instanceof Number}function ub(n){return n instanceof Error}function lm(n){return typeof n=="function"}function dm(n){return Array.isArray(n)}function lb(n){return dm(n)&&n.every(e=>um(e))}function db(n,e){return Array.isArray(n)&&n.every(e)}function fm(n){return n&&lm(n.then)}function fb(n){return n instanceof Promise?n:fm(n)?new Promise((e,t)=>{n.then(r=>e(r),r=>t(r))}):Promise.resolve(n)}});var Fe=F(vr=>{"use strict";y();Object.defineProperty(vr,"__esModule",{value:!0});vr.empty=void 0;vr.v4=hm;vr.isUUID=pm;vr.parse=pb;vr.generateUuid=gb;var eo=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},Ju=class n extends eo{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}};vr.empty=new eo("00000000-0000-0000-0000-000000000000");function hm(){return new Ju}var hb=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function pm(n){return hb.test(n)}function pb(n){if(!pm(n))throw new Error("invalid uuid");return new eo(n)}function gb(){return hm().asHex()}});var ge=F($e=>{"use strict";y();var mb=$e&&$e.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),yb=$e&&$e.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),vm=$e&&$e.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&mb(t,e,r[i]);return yb(t,e),t}})();Object.defineProperty($e,"__esModule",{value:!0});$e.WorkspaceFeature=$e.TextDocumentLanguageFeature=$e.TextDocumentEventFeature=$e.DynamicDocumentFeature=$e.DynamicFeature=$e.StaticFeature=$e.LSPCancellationError=void 0;$e.ensure=vb;var _r=require("vscode"),Qu=oe(),yt=vm(Qt()),gm=vm(Fe()),Xu=class extends _r.CancellationError{data;constructor(e){super(),this.data=e}};$e.LSPCancellationError=Xu;function vb(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var mm;(function(n){function e(t){let r=t;return r!=null&&yt.func(r.fillClientCapabilities)&&yt.func(r.initialize)&&yt.func(r.getState)&&yt.func(r.clear)&&(r.fillInitializeParams===void 0||yt.func(r.fillInitializeParams))}n.is=e})(mm||($e.StaticFeature=mm={}));var ym;(function(n){function e(t){let r=t;return r!=null&&yt.func(r.fillClientCapabilities)&&yt.func(r.initialize)&&yt.func(r.getState)&&yt.func(r.clear)&&(r.fillInitializeParams===void 0||yt.func(r.fillInitializeParams))&&yt.func(r.register)&&yt.func(r.unregister)&&r.registrationType!==void 0}n.is=e})(ym||($e.DynamicFeature=ym={}));var to=class{_client;constructor(e){this._client=e}getState(){let e=this.getDocumentSelectors(),t=0;for(let i of e){t++;for(let o of _r.workspace.textDocuments)if(_r.languages.match(i,o)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}let r=t>0;return{kind:"document",id:this.registrationType.method,registrations:r,matches:!1}}};$e.DynamicDocumentFeature=to;var Zu=class extends to{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onNotificationSent;static textDocumentFilter(e,t){for(let r of e)if(_r.languages.match(r,t)>0)return!0;return!1}constructor(e,t,r,i,o,s,a){super(e),this._event=t,this._type=r,this._middleware=i,this._createParams=o,this._textDocument=s,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new _r.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(t=>{this.callback(t).catch(r=>{this._client.error(`Sending document notification ${this._type.method} failed.`,r)})})),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){let t=async r=>{let i=this._createParams(r);await this._client.sendNotification(this._type,i),this.notificationSent(this.getTextDocument(r),this._type,i)};if(this.matches(e)){let r=this._middleware();return r?r(e,i=>t(i)):t(e)}}matches(e){return this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))?!1:!this._selectorFilter||this._selectorFilter(this._selectors.values(),e)}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._onNotificationSent=new _r.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(_r.languages.match(t,e)>0)return{send:r=>this.callback(r)}}};$e.TextDocumentEventFeature=Zu;var Yu=class extends to{_registrationType;_registrations;constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(let e of this._registrations.values()){let t=e.data.registerOptions.documentSelector;t!==null&&(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);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(Qu.TextDocumentRegistrationOptions.is(t)){let r=Qu.StaticRegistrationOptions.hasId(t)?t.id:gm.generateUuid(),i=t.documentSelector??e;if(i)return[r,Object.assign({},t,{documentSelector:i})]}else if(yt.boolean(t)&&t===!0||Qu.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let r=yt.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[gm.generateUuid(),r]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return yt.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let r=t.data.registerOptions.documentSelector;if(r!==null&&_r.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(r),e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};$e.TextDocumentLanguageFeature=Yu;var el=class{_client;_registrationType;_registrations;constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};$e.WorkspaceFeature=el});var bm=F(Fr=>{"use strict";y();Object.defineProperty(Fr,"__esModule",{value:!0});Fr.range=Fr.balanced=void 0;var _b=(n,e,t)=>{let r=n instanceof RegExp?_m(n,t):n,i=e instanceof RegExp?_m(e,t):e,o=r!==null&&i!=null&&(0,Fr.range)(r,i,t);return o&&{start:o[0],end:o[1],pre:t.slice(0,o[0]),body:t.slice(o[0]+r.length,o[1]),post:t.slice(o[1]+i.length)}};Fr.balanced=_b;var _m=(n,e)=>{let t=e.match(n);return t?t[0]:null},bb=(n,e,t)=>{let r,i,o,s,a,u=t.indexOf(n),l=t.indexOf(e,u+1),f=u;if(u>=0&&l>0){if(n===e)return[u,l];for(r=[],o=t.length;f>=0&&!a;){if(f===u)r.push(f),u=t.indexOf(n,f+1);else if(r.length===1){let h=r.pop();h!==void 0&&(a=[h,l])}else i=r.pop(),i!==void 0&&i<o&&(o=i,s=l),l=t.indexOf(e,f+1);f=u<l&&u>=0?u:l}r.length&&s!==void 0&&(a=[o,s])}return a};Fr.range=bb});var Tm=F(_i=>{"use strict";y();Object.defineProperty(_i,"__esModule",{value:!0});_i.EXPANSION_MAX=void 0;_i.expand=jb;var Cm=bm(),wm="\0SLASH"+Math.random()+"\0",Dm="\0OPEN"+Math.random()+"\0",nl="\0CLOSE"+Math.random()+"\0",Sm="\0COMMA"+Math.random()+"\0",Pm="\0PERIOD"+Math.random()+"\0",Cb=new RegExp(wm,"g"),wb=new RegExp(Dm,"g"),Db=new RegExp(nl,"g"),Sb=new RegExp(Sm,"g"),Pb=new RegExp(Pm,"g"),Rb=/\\\\/g,Tb=/\\{/g,Ob=/\\}/g,qb=/\\,/g,xb=/\\./g;_i.EXPANSION_MAX=1e5;function tl(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function Mb(n){return n.replace(Rb,wm).replace(Tb,Dm).replace(Ob,nl).replace(qb,Sm).replace(xb,Pm)}function Eb(n){return n.replace(Cb,"\\").replace(wb,"{").replace(Db,"}").replace(Sb,",").replace(Pb,".")}function Rm(n){if(!n)return[""];let e=[],t=(0,Cm.balanced)("{","}",n);if(!t)return n.split(",");let{pre:r,body:i,post:o}=t,s=r.split(",");s[s.length-1]+="{"+i+"}";let a=Rm(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function jb(n,e={}){if(!n)return[];let{max:t=_i.EXPANSION_MAX}=e;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),no(Mb(n),t,!0).map(Eb)}function Fb(n){return"{"+n+"}"}function Ib(n){return/^-?0\d/.test(n)}function Nb(n,e){return n<=e}function kb(n,e){return n>=e}function no(n,e,t){let r=[],i=(0,Cm.balanced)("{","}",n);if(!i)return[n];let o=i.pre,s=i.post.length?no(i.post,e,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<s.length&&a<e;a++){let u=o+"{"+i.body+"}"+s[a];r.push(u)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=a||u,f=i.body.indexOf(",")>=0;if(!l&&!f)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+nl+i.post,no(n,e,!0)):[n];let h;if(l)h=i.body.split(/\.\./);else if(h=Rm(i.body),h.length===1&&h[0]!==void 0&&(h=no(h[0],e,!1).map(Fb),h.length===1))return s.map(m=>i.pre+h[0]+m);let p;if(l&&h[0]!==void 0&&h[1]!==void 0){let m=tl(h[0]),b=tl(h[1]),C=Math.max(h[0].length,h[1].length),j=h.length===3&&h[2]!==void 0?Math.abs(tl(h[2])):1,U=Nb;b<m&&(j*=-1,U=kb);let L=h.some(Ib);p=[];for(let Y=m;U(Y,b);Y+=j){let k;if(u)k=String.fromCharCode(Y),k==="\\"&&(k="");else if(k=String(Y),L){let le=C-k.length;if(le>0){let ue=new Array(le+1).join("0");Y<0?k="-"+ue+k.slice(1):k=ue+k}}p.push(k)}}else{p=[];for(let m=0;m<h.length;m++)p.push.apply(p,no(h[m],e,!1))}for(let m=0;m<p.length;m++)for(let b=0;b<s.length&&r.length<e;b++){let C=o+p[m]+s[b];(!t||l||C)&&r.push(C)}}return r}});var Om=F(gs=>{"use strict";y();Object.defineProperty(gs,"__esModule",{value:!0});gs.assertValidPattern=void 0;var Ab=1024*64,Lb=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>Ab)throw new TypeError("pattern is too long")};gs.assertValidPattern=Lb});var xm=F(ms=>{"use strict";y();Object.defineProperty(ms,"__esModule",{value:!0});ms.parseClass=void 0;var Hb={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ro=n=>n.replace(/[[\]\\-]/g,"\\$&"),Ub=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qm=n=>n.join(""),Wb=(n,e)=>{let t=e;if(n.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],o=t+1,s=!1,a=!1,u=!1,l=!1,f=t,h="";e:for(;o<n.length;){let C=n.charAt(o);if((C==="!"||C==="^")&&o===t+1){l=!0,o++;continue}if(C==="]"&&s&&!u){f=o+1;break}if(s=!0,C==="\\"&&!u){u=!0,o++;continue}if(C==="["&&!u){for(let[j,[U,E,L]]of Object.entries(Hb))if(n.startsWith(j,o)){if(h)return["$.",!1,n.length-t,!0];o+=j.length,L?i.push(U):r.push(U),a=a||E;continue e}}if(u=!1,h){C>h?r.push(ro(h)+"-"+ro(C)):C===h&&r.push(ro(C)),h="",o++;continue}if(n.startsWith("-]",o+1)){r.push(ro(C+"-")),o+=2;continue}if(n.startsWith("-",o+1)){h=C,o+=2;continue}r.push(ro(C)),o++}if(f<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,n.length-t,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let C=r[0].length===2?r[0].slice(-1):r[0];return[Ub(C),!1,f-t,!1]}let p="["+(l?"^":"")+qm(r)+"]",m="["+(l?"":"^")+qm(i)+"]";return[r.length&&i.length?"("+p+"|"+m+")":r.length?p:m,a,f-t,!0]};ms.parseClass=Wb});var vs=F(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.unescape=void 0;var $b=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");ys.unescape=$b});var ol=F(Cs=>{"use strict";y();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AST=void 0;var zb=xm(),_s=vs(),Kb=new Set(["!","?","+","*","@"]),Mm=n=>Kb.has(n),Bb="(?!(?:^|/)\\.\\.?(?:$|/))",bs="(?!\\.)",Vb=new Set(["[","."]),Gb=new Set(["..","."]),Jb=new Set("().*{}+?[]^$\\!"),Qb=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),il="[^/]",Em=il+"*?",jm=il+"+?",rl=class n{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#a=!1;#i;#u;#d=!1;constructor(e,t,r={}){this.type=e,e&&(this.#r=!0),this.#t=t,this.#n=this.#t?this.#t.#n:this,this.#i=this.#n===this?r:this.#n.#i,this.#c=this.#n===this?[]:this.#n.#c,e==="!"&&!this.#n.#a&&this.#c.push(this),this.#s=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#u=this.#e.map(e=>String(e)).join("")}#h(){if(this!==this.#n)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let e;for(;e=this.#c.pop();){if(e.type!=="!")continue;let t=e,r=t.#t;for(;r;){for(let i=t.#s+1;!r.type&&i<r.#e.length;i++)for(let o of e.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(r.#e[i])}t=r,r=t.#t}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof n&&t.#t===this))throw new Error("invalid part: "+t);this.#e.push(t)}}toJSON(){let e=this.type===null?this.#e.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#a&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#s===0)return!0;let e=this.#t;for(let t=0;t<this.#s;t++){let r=e.#e[t];if(!(r instanceof n&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let e=this.#t?this.#t.#e.length:0;return this.#s===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new n(this.type,e);for(let r of this.#e)t.copyIn(r);return t}static#l(e,t,r,i){let o=!1,s=!1,a=-1,u=!1;if(t.type===null){let m=r,b="";for(;m<e.length;){let C=e.charAt(m++);if(o||C==="\\"){o=!o,b+=C;continue}if(s){m===a+1?(C==="^"||C==="!")&&(u=!0):C==="]"&&!(m===a+2&&u)&&(s=!1),b+=C;continue}else if(C==="["){s=!0,a=m,u=!1,b+=C;continue}if(!i.noext&&Mm(C)&&e.charAt(m)==="("){t.push(b),b="";let j=new n(C,t);m=n.#l(e,j,m,i),t.push(j);continue}b+=C}return t.push(b),m}let l=r+1,f=new n(null,t),h=[],p="";for(;l<e.length;){let m=e.charAt(l++);if(o||m==="\\"){o=!o,p+=m;continue}if(s){l===a+1?(m==="^"||m==="!")&&(u=!0):m==="]"&&!(l===a+2&&u)&&(s=!1),p+=m;continue}else if(m==="["){s=!0,a=l,u=!1,p+=m;continue}if(Mm(m)&&e.charAt(l)==="("){f.push(p),p="";let b=new n(m,f);f.push(b),l=n.#l(e,b,l,i);continue}if(m==="|"){f.push(p),p="",h.push(f),f=new n(null,t);continue}if(m===")")return p===""&&t.#e.length===0&&(t.#d=!0),f.push(p),p="",t.push(...h,f),l;p+=m}return t.type=null,t.#r=void 0,t.#e=[e.substring(r-1)],l}static fromGlob(e,t={}){let r=new n(null,void 0,t);return n.#l(e,r,0,t),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let e=this.toString(),[t,r,i,o]=this.toRegExpSource();if(!(i||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let a=(this.#i.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#i}toRegExpSource(e){let t=e??!!this.#i.dot;if(this.#n===this&&this.#h(),!this.type){let u=this.isStart()&&this.isEnd()&&!this.#e.some(m=>typeof m!="string"),l=this.#e.map(m=>{let[b,C,j,U]=typeof m=="string"?n.#p(m,this.#r,u):m.toRegExpSource(e);return this.#r=this.#r||j,this.#o=this.#o||U,b}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Gb.has(this.#e[0]))){let b=Vb,C=t&&b.has(l.charAt(0))||l.startsWith("\\.")&&b.has(l.charAt(2))||l.startsWith("\\.\\.")&&b.has(l.charAt(4)),j=!t&&!e&&b.has(l.charAt(0));f=C?Bb:j?bs:""}let h="";return this.isEnd()&&this.#n.#a&&this.#t?.type==="!"&&(h="(?:$|\\/)"),[f+l+h,(0,_s.unescape)(l),this.#r=!!this.#r,this.#o]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#f(t);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let u=this.toString();return this.#e=[u],this.type=null,this.#r=void 0,[u,(0,_s.unescape)(this.toString()),!1,!1]}let s=!r||e||t||!bs?"":this.#f(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let a="";if(this.type==="!"&&this.#d)a=(this.isStart()&&!t?bs:"")+jm;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?bs:"")+Em+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=i+o+u}return[a,(0,_s.unescape)(o),this.#r=!!this.#r,this.#o]}#f(e){return this.#e.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,o,s]=t.toRegExpSource(e);return this.#o=this.#o||s,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#p(e,t,r=!1){let i=!1,o="",s=!1,a=!1;for(let u=0;u<e.length;u++){let l=e.charAt(u);if(i){i=!1,o+=(Jb.has(l)?"\\":"")+l;continue}if(l==="*"){if(a)continue;a=!0,o+=r&&/^[*]+$/.test(e)?jm:Em,t=!0;continue}else a=!1;if(l==="\\"){u===e.length-1?o+="\\\\":i=!0;continue}if(l==="["){let[f,h,p,m]=(0,zb.parseClass)(e,u);if(p){o+=f,s=s||h,u+=p-1,t=t||m;continue}}if(l==="?"){o+=il,t=!0;continue}o+=Qb(l)}return[o,(0,_s.unescape)(e),!!t,s]}};Cs.AST=rl});var sl=F(ws=>{"use strict";y();Object.defineProperty(ws,"__esModule",{value:!0});ws.escape=void 0;var Xb=(n,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):e?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");ws.escape=Xb});var al=F(Z=>{"use strict";y();Object.defineProperty(Z,"__esModule",{value:!0});Z.unescape=Z.escape=Z.AST=Z.Minimatch=Z.match=Z.makeRe=Z.braceExpand=Z.defaults=Z.filter=Z.GLOBSTAR=Z.sep=Z.minimatch=void 0;var Zb=Tm(),Ds=Om(),Nm=ol(),Yb=sl(),eC=vs(),tC=(n,e,t={})=>((0,Ds.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Ir(e,t).match(n));Z.minimatch=tC;var nC=/^\*+([^+@!?\*\[\(]*)$/,rC=n=>e=>!e.startsWith(".")&&e.endsWith(n),iC=n=>e=>e.endsWith(n),oC=n=>(n=n.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(n)),sC=n=>(n=n.toLowerCase(),e=>e.toLowerCase().endsWith(n)),aC=/^\*+\.\*+$/,cC=n=>!n.startsWith(".")&&n.includes("."),uC=n=>n!=="."&&n!==".."&&n.includes("."),lC=/^\.\*+$/,dC=n=>n!=="."&&n!==".."&&n.startsWith("."),fC=/^\*+$/,hC=n=>n.length!==0&&!n.startsWith("."),pC=n=>n.length!==0&&n!=="."&&n!=="..",gC=/^\?+([^+@!?\*\[\(]*)?$/,mC=([n,e=""])=>{let t=km([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},yC=([n,e=""])=>{let t=Am([n]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},vC=([n,e=""])=>{let t=Am([n]);return e?r=>t(r)&&r.endsWith(e):t},_C=([n,e=""])=>{let t=km([n]);return e?r=>t(r)&&r.endsWith(e):t},km=([n])=>{let e=n.length;return t=>t.length===e&&!t.startsWith(".")},Am=([n])=>{let e=n.length;return t=>t.length===e&&t!=="."&&t!==".."},Lm=typeof process=="object"&&process?typeof q=="object"&&q&&q.__MINIMATCH_TESTING_PLATFORM__||"web":"posix",Fm={win32:{sep:"\\"},posix:{sep:"/"}};Z.sep=Lm==="win32"?Fm.win32.sep:Fm.posix.sep;Z.minimatch.sep=Z.sep;Z.GLOBSTAR=Symbol("globstar **");Z.minimatch.GLOBSTAR=Z.GLOBSTAR;var bC="[^/]",CC=bC+"*?",wC="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",DC="(?:(?!(?:\\/|^)\\.).)*?",SC=(n,e={})=>t=>(0,Z.minimatch)(t,n,e);Z.filter=SC;Z.minimatch.filter=Z.filter;var Wt=(n,e={})=>Object.assign({},n,e),PC=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return Z.minimatch;let e=Z.minimatch;return Object.assign((r,i,o={})=>e(r,i,Wt(n,o)),{Minimatch:class extends e.Minimatch{constructor(i,o={}){super(i,Wt(n,o))}static defaults(i){return e.defaults(Wt(n,i)).Minimatch}},AST:class extends e.AST{constructor(i,o,s={}){super(i,o,Wt(n,s))}static fromGlob(i,o={}){return e.AST.fromGlob(i,Wt(n,o))}},unescape:(r,i={})=>e.unescape(r,Wt(n,i)),escape:(r,i={})=>e.escape(r,Wt(n,i)),filter:(r,i={})=>e.filter(r,Wt(n,i)),defaults:r=>e.defaults(Wt(n,r)),makeRe:(r,i={})=>e.makeRe(r,Wt(n,i)),braceExpand:(r,i={})=>e.braceExpand(r,Wt(n,i)),match:(r,i,o={})=>e.match(r,i,Wt(n,o)),sep:e.sep,GLOBSTAR:Z.GLOBSTAR})};Z.defaults=PC;Z.minimatch.defaults=Z.defaults;var RC=(n,e={})=>((0,Ds.assertValidPattern)(n),e.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,Zb.expand)(n,{max:e.braceExpandMax}));Z.braceExpand=RC;Z.minimatch.braceExpand=Z.braceExpand;var TC=(n,e={})=>new Ir(n,e).makeRe();Z.makeRe=TC;Z.minimatch.makeRe=Z.makeRe;var OC=(n,e,t={})=>{let r=new Ir(e,t);return n=n.filter(i=>r.match(i)),r.options.nonull&&!n.length&&n.push(e),n};Z.match=OC;Z.minimatch.match=Z.match;var Im=/[?*]|[+@!]\(.*?\)|\[|\]/,qC=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ir=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,Ds.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Lm,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=o[0]===""&&o[1]===""&&(o[2]==="?"||!Im.test(o[2]))&&!Im.test(o[3]),l=/^[a-z]:/i.test(o[0]);if(u)return[...o.slice(0,4),...o.slice(4).map(f=>this.parse(f))];if(l)return[o[0],...o.slice(1).map(f=>this.parse(f))]}return o.map(u=>this.parse(u))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let i=0;i<e[r].length;i++)e[r][i]==="**"&&(e[r][i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let o=r[r.length-1];return i==="**"&&o==="**"?r:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let o=e[i];i===1&&o===""&&e[0]===""||(o==="."||o==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let i=e[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s>i&&r.splice(i+1,s-i);let a=r[i+1],u=r[i+2],l=r[i+3];if(a!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(i,1);let f=r.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let a=r[s];s===1&&a===""&&r[0]===""||(a==="."||a==="")&&(t=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){let s=r[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){t=!0;let u=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...u),r.length===0&&r.push(""),o-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){let i=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(i){e[t]=[],e[r]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,r=!1){let i=0,o=0,s=[],a="";for(;i<e.length&&o<t.length;)if(e[i]===t[o])s.push(a==="b"?t[o]:e[i]),i++,o++;else if(r&&e[i]==="**"&&t[o]===e[i+1])s.push(e[i]),i++;else if(r&&t[o]==="**"&&e[i]===t[o+1])s.push(t[o]),o++;else if(e[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(a==="b")return!1;a="a",s.push(e[i]),i++,o++}else if(t[o]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(a==="a")return!1;a="b",s.push(t[o]),i++,o++}else return!1;return e.length===t.length&&s}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,r=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let i=this.options;if(this.isWindows){let C=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),j=!C&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),U=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),E=!U&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),L=j?3:C?0:void 0,Y=E?3:U?0:void 0;if(typeof L=="number"&&typeof Y=="number"){let[k,le]=[e[L],t[Y]];k.toLowerCase()===le.toLowerCase()&&(t[Y]=k,Y>L?t=t.slice(Y):L>Y&&(e=e.slice(L)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,a=0,u=e.length,l=t.length;s<u&&a<l;s++,a++){this.debug("matchOne loop");var f=t[a],h=e[s];if(this.debug(t,f,h),f===!1)return!1;if(f===Z.GLOBSTAR){this.debug("GLOBSTAR",[t,f,h]);var p=s,m=a+1;if(m===l){for(this.debug("** at the end");s<u;s++)if(e[s]==="."||e[s]===".."||!i.dot&&e[s].charAt(0)===".")return!1;return!0}for(;p<u;){var b=e[p];if(this.debug(`
|
|
12
|
+
globstar while`,e,p,t,m,b),this.matchOne(e.slice(p),t.slice(m),r))return this.debug("globstar found match!",p,u,b),!0;if(b==="."||b===".."||!i.dot&&b.charAt(0)==="."){this.debug("dot detected!",e,p,t,m);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
|
|
13
|
+
>>> no match, partial?`,e,p,t,m),p===u))}let C;if(typeof f=="string"?(C=h===f,this.debug("string match",f,h,C)):(C=f.test(h),this.debug("pattern match",f,h,C)),!C)return!1}if(s===u&&a===l)return!0;if(s===u)return r;if(a===l)return s===u-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return(0,Z.braceExpand)(this.pattern,this.options)}parse(e){(0,Ds.assertValidPattern)(e);let t=this.options;if(e==="**")return Z.GLOBSTAR;if(e==="")return"";let r,i=null;(r=e.match(fC))?i=t.dot?pC:hC:(r=e.match(nC))?i=(t.nocase?t.dot?sC:oC:t.dot?iC:rC)(r[1]):(r=e.match(gC))?i=(t.nocase?t.dot?yC:mC:t.dot?vC:_C)(r):(r=e.match(aC))?i=t.dot?uC:cC:(r=e.match(lC))&&(i=dC);let o=Nm.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,r=t.noglobstar?CC:t.dot?wC:DC,i=new Set(t.nocase?["i"]:[]),o=e.map(u=>{let l=u.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))i.add(p);return typeof h=="string"?qC(h):h===Z.GLOBSTAR?Z.GLOBSTAR:h._src});l.forEach((h,p)=>{let m=l[p+1],b=l[p-1];h!==Z.GLOBSTAR||b===Z.GLOBSTAR||(b===void 0?m!==void 0&&m!==Z.GLOBSTAR?l[p+1]="(?:\\/|"+r+"\\/)?"+m:l[p]=r:m===void 0?l[p-1]=b+"(?:\\/|\\/"+r+")?":m!==Z.GLOBSTAR&&(l[p-1]=b+"(?:\\/|\\/"+r+"\\/)"+m,l[p+1]=Z.GLOBSTAR))});let f=l.filter(h=>h!==Z.GLOBSTAR);if(this.partial&&f.length>=1){let h=[];for(let p=1;p<=f.length;p++)h.push(f.slice(0,p).join("/"));return"(?:"+h.join("|")+")"}return f.join("/")}).join("|"),[s,a]=e.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}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;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let s=i[i.length-1];if(!s)for(let a=i.length-2;!s&&a>=0;a--)s=i[a];for(let a=0;a<o.length;a++){let u=o[a],l=i;if(r.matchBase&&u.length===1&&(l=[s]),this.matchOne(l,u,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return Z.minimatch.defaults(e).Minimatch}};Z.Minimatch=Ir;var xC=ol();Object.defineProperty(Z,"AST",{enumerable:!0,get:function(){return xC.AST}});var MC=sl();Object.defineProperty(Z,"escape",{enumerable:!0,get:function(){return MC.escape}});var EC=vs();Object.defineProperty(Z,"unescape",{enumerable:!0,get:function(){return EC.unescape}});Z.minimatch.AST=Nm.AST;Z.minimatch.Minimatch=Ir;Z.minimatch.escape=Yb.escape;Z.minimatch.unescape=eC.unescape});var cl=F(Un=>{"use strict";y();var jC=Un&&Un.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),FC=Un&&Un.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),IC=Un&&Un.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&jC(t,e,r[i]);return FC(t,e),t}})();Object.defineProperty(Un,"__esModule",{value:!0});Un.matchGlobPattern=AC;var NC=IC(al()),kC=require("vscode");function AC(n,e){let t;if(typeof n=="string")t=n.replace(/\\/g,"/");else try{let i=kC.Uri.parse(typeof n.baseUri=="string"?n.baseUri:n.baseUri.uri);t=i.with({path:i.path+"/"+n.pattern}).fsPath.replace(/\\/g,"/")}catch{return!1}let r=new NC.Minimatch(t,{noext:!0});return r.makeRe()?r.match(e.fsPath):!1}});var gl=F(br=>{"use strict";y();Object.defineProperty(br,"__esModule",{value:!0});br.DiagnosticFeature=br.DiagnosticPullMode=br.vsdiag=void 0;var Ne=require("vscode"),Ie=oe(),LC=Fe(),HC=cl(),ul=ge();function Ss(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var $t;(function(n){let e;(function(t){t.full="full",t.unChanged="unChanged"})(e=n.DocumentDiagnosticReportKind||(n.DocumentDiagnosticReportKind={}))})($t||(br.vsdiag=$t={}));var io;(function(n){n.onType="onType",n.onSave="onSave",n.onFocus="onFocus"})(io||(br.DiagnosticPullMode=io={}));var it;(function(n){n.active="open",n.reschedule="reschedule",n.outDated="drop"})(it||(it={}));var Qe;(function(n){n[n.document=1]="document",n[n.workspace=2]="workspace"})(Qe||(Qe={}));var Wn;(function(n){function e(t){return t instanceof Ne.Uri?t.toString():t.uri.toString()}n.asKey=e})(Wn||(Wn={}));var ll=class{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,r){let i=e===Qe.document?this.documentPullStates:this.workspacePullStates,[o,s,a]=t instanceof Ne.Uri?[t.toString(),t,r]:[t.uri.toString(),t.uri,t.version],u=i.get(o);return u===void 0&&(u={document:s,pulledVersion:a,resultId:void 0},i.set(o,u)),u}update(e,t,r,i){let o=e===Qe.document?this.documentPullStates:this.workspacePullStates,[s,a,u,l]=t instanceof Ne.Uri?[t.toString(),t,r,i]:[t.uri.toString(),t.uri,t.version,r],f=o.get(s);f===void 0?(f={document:a,pulledVersion:u,resultId:l},o.set(s,f)):(f.pulledVersion=u,f.resultId=l)}unTrack(e,t){let r=Wn.asKey(t);(e===Qe.document?this.documentPullStates:this.workspacePullStates).delete(r)}tracks(e,t){let r=Wn.asKey(t);return(e===Qe.document?this.documentPullStates:this.workspacePullStates).has(r)}tracksSameVersion(e,t){let r=t.uri.toString(),o=(e===Qe.document?this.documentPullStates:this.workspacePullStates).get(r);return o!==void 0&&o.pulledVersion===t.version}getResultId(e,t){let r=Wn.asKey(t);return(e===Qe.document?this.documentPullStates:this.workspacePullStates).get(r)?.resultId}getAllResultIds(){let e=[];for(let[t,r]of this.workspacePullStates)this.documentPullStates.has(t)&&(r=this.documentPullStates.get(t)),r.resultId!==void 0&&e.push({uri:t,value:r.resultId});return e}},dl=class{isDisposed;client;visibleDocuments;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,t,r){this.client=e,this.visibleDocuments=t,this.options=r,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new Ne.EventEmitter,this.provider=this.createProvider(),this.diagnostics=Ne.languages.createDiagnosticCollection(r.identifier),this.openRequests=new Map,this.documentStates=new ll,this.workspaceErrorCounter=0}knows(e,t){let r=t instanceof Ne.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(r.toString())}knowsSameVersion(e,t){let r=this.openRequests.get(t.uri.toString());return r===void 0?this.documentStates.tracksSameVersion(e,t):r.state===it.reschedule?!0:r.state===it.outDated?!1:r.version===t.version}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;let r=e instanceof Ne.Uri?e:e.uri;this.pullAsync(e).then(()=>{t&&t()},i=>{this.client.error(`Document pull failed for text document ${r.toString()}`,i,!1)})}async pullAsync(e,t){if(this.isDisposed)return;let r=e instanceof Ne.Uri,i=r?e:e.uri,o=i.toString();t=r?t:e.version;let s=this.openRequests.get(o),a=r?this.documentStates.track(Qe.document,e,t):this.documentStates.track(Qe.document,e);if(s===void 0){let u=new Ne.CancellationTokenSource;this.openRequests.set(o,{state:it.active,document:e,version:t,tokenSource:u});let l,f;try{l=await this.provider.provideDiagnostics(e,a.resultId,u.token)??{kind:$t.DocumentDiagnosticReportKind.full,items:[]}}catch(h){if(h instanceof ul.LSPCancellationError&&Ie.DiagnosticServerCancellationData.is(h.data)&&h.data.retriggerRequest===!1&&(f={state:it.outDated,document:e}),f===void 0&&h instanceof Ne.CancellationError)f={state:it.reschedule,document:e};else throw h}if(f=f??this.openRequests.get(o),f===void 0){this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${o}`),this.diagnostics.delete(i);return}if(this.openRequests.delete(o),!this.visibleDocuments.isVisible(e)){this.documentStates.unTrack(Qe.document,e);return}if(f.state===it.outDated)return;l!==void 0&&(l.kind===$t.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,l.items),a.pulledVersion=t,a.resultId=l.resultId),f.state===it.reschedule&&this.pull(e)}else s.state===it.active?(s.tokenSource.cancel(),this.openRequests.set(o,{state:it.reschedule,document:s.document})):s.state===it.outDated&&this.openRequests.set(o,{state:it.reschedule,document:s.document})}forgetDocument(e){let t=e instanceof Ne.Uri?e:e.uri,r=t.toString(),i=this.openRequests.get(r);this.options.workspaceDiagnostics?(i!==void 0?this.openRequests.set(r,{state:it.reschedule,document:e}):this.pull(e,()=>{this.forget(Qe.document,e)}),this.forget(Qe.workspace,e)):(i!==void 0&&(i.state===it.active&&i.tokenSource.cancel(),this.openRequests.set(r,{state:it.outDated,document:e})),this.diagnostics.delete(t),this.forget(Qe.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then(()=>{this.workspaceTimeout=(0,Ie.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3)},e=>{!(e instanceof ul.LSPCancellationError)&&!Ie.DiagnosticServerCancellationData.is(e.data)&&(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,Ie.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3))})}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;this.workspaceCancellation!==void 0&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new Ne.CancellationTokenSource;let e=this.documentStates.getAllResultIds().map(t=>({uri:this.client.protocol2CodeConverter.asUri(t.uri),value:t.value}));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,t=>{if(!(!t||this.isDisposed))for(let r of t.items)r.kind===$t.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(Qe.document,r.uri)||this.diagnostics.set(r.uri,r.items)),this.documentStates.update(Qe.workspace,r.uri,r.version??void 0,r.resultId)})}createProvider(){let e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(t,r,i)=>{let o=(a,u,l)=>{let f={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(a instanceof Ne.Uri?a:a.uri)},previousResultId:u};return this.isDisposed===!0||!this.client.isRunning()?{kind:$t.DocumentDiagnosticReportKind.full,items:[]}:this.client.sendRequest(Ie.DocumentDiagnosticRequest.type,f,l).then(async h=>h==null||this.isDisposed||l.isCancellationRequested?{kind:$t.DocumentDiagnosticReportKind.full,items:[]}:h.kind===Ie.DocumentDiagnosticReportKind.Full?{kind:$t.DocumentDiagnosticReportKind.full,resultId:h.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(h.items,l)}:{kind:$t.DocumentDiagnosticReportKind.unChanged,resultId:h.resultId},h=>this.client.handleFailedRequest(Ie.DocumentDiagnosticRequest.type,l,h,{kind:$t.DocumentDiagnosticReportKind.full,items:[]},!0,!0))},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(t,r,i,o):o(t,r,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(t,r,i)=>{let o=async l=>l.kind===Ie.DocumentDiagnosticReportKind.Full?{kind:$t.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version,items:await this.client.protocol2CodeConverter.asDiagnostics(l.items,r)}:{kind:$t.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version},s=l=>{let f=[];for(let h of l)f.push({uri:this.client.code2ProtocolConverter.asUri(h.uri),value:h.value});return f},a=(l,f,h)=>{let p=(0,LC.generateUuid)(),m=this.client.onProgress(Ie.WorkspaceDiagnosticRequest.partialResult,p,async C=>{if(C==null){h(null);return}let j={items:[]};for(let U of C.items)try{j.items.push(await o(U))}catch(E){this.client.error("Converting workspace diagnostics failed.",E)}h(j)}),b={identifier:this.options.identifier,previousResultIds:s(l),partialResultToken:p};return this.isDisposed===!0||!this.client.isRunning()?{items:[]}:this.client.sendRequest(Ie.WorkspaceDiagnosticRequest.type,b,f).then(async C=>{if(f.isCancellationRequested)return{items:[]};let j={items:[]};for(let U of C.items)j.items.push(await o(U));return m.dispose(),h(j),{items:[]}},C=>(m.dispose(),this.client.handleFailedRequest(Ie.DocumentDiagnosticRequest.type,f,C,{items:[]})))},u=this.client.middleware;return u.provideWorkspaceDiagnostics?u.provideWorkspaceDiagnostics(t,r,i,a):a(t,r,i)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(let[e,t]of this.openRequests)t.state===it.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:it.outDated,document:t.document});this.diagnostics.dispose()}},fl=class{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,t){this.client=e,this.diagnosticRequestor=t,this.documents=new Ie.LinkedMap,this.isDisposed=!1}add(e){if(this.isDisposed===!0)return;let t=Wn.asKey(e);this.documents.has(t)||(this.documents.set(t,e,Ie.Touch.Last),this.lastDocumentToPull=e)}remove(e){let t=Wn.asKey(e);if(this.documents.delete(t),this.documents.size===0){this.stop();return}else if(t===this.lastDocumentToPullKey()){let r=this.documents.before(t);r===void 0?this.stop():this.lastDocumentToPull=r}}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){if(this.isDisposed!==!0){if(this.documents.size===0){this.stop();return}this.lastDocumentToPull!==void 0&&this.timeoutHandle===void 0&&(this.timeoutHandle=(0,Ie.RAL)().timer.setTimeout(()=>{let e=this.documents.first;if(e===void 0)return;let t=Wn.asKey(e);this.diagnosticRequestor.pullAsync(e).catch(r=>{this.client.error(`Document pull failed for text document ${t}`,r,!1)}).finally(()=>{this.timeoutHandle=void 0,this.documents.set(t,e,Ie.Touch.Last),t!==this.lastDocumentToPullKey()&&this.runLoop()})},500))}}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return this.lastDocumentToPull!==void 0?Wn.asKey(this.lastDocumentToPull):void 0}},hl=class{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,t,r){let i=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),o=e.protocol2CodeConverter.asDocumentSelector(r.documentSelector),s=[],a=(E,L)=>!(typeof E=="string"||E.language!==void 0&&E.language!=="*"||E.scheme!==void 0&&E.scheme!=="*"&&E.scheme!==L.scheme||E.pattern!==void 0&&!(0,HC.matchGlobPattern)(E.pattern,L)),u=E=>{let L=r.documentSelector;if(i.match!==void 0)return i.match(L,E);for(let Y of L)if(Ie.TextDocumentFilter.is(Y)&&a(Y,E))return!0;return!1},l=E=>E instanceof Ne.Uri?u(E):Ne.languages.match(o,E)>0&&t.isVisible(E),f=E=>Ne.languages.match(o,E.document)>0&&t.isVisible(E.notebook.uri),h=E=>E instanceof Ne.Uri?this.activeTextDocument?.uri.toString()===E.toString():this.activeTextDocument===E;this.diagnosticRequestor=new dl(e,t,r),this.backgroundScheduler=new fl(e,this.diagnosticRequestor);let p=E=>{!l(E)||!r.interFileDependencies||h(E)||i.onChange===!1||this.backgroundScheduler.add(E)},m=(E,L)=>(i.filter===void 0||!i.filter(E,L))&&this.diagnosticRequestor.knows(Qe.document,E);this.activeTextDocument=Ne.window.activeTextEditor?.document,s.push(Ne.window.onDidChangeActiveTextEditor(E=>{let L=this.activeTextDocument;this.activeTextDocument=E?.document,L!==void 0&&p(L),this.activeTextDocument!==void 0&&(this.backgroundScheduler.remove(this.activeTextDocument),i.onFocus===!0&&l(this.activeTextDocument)&&m(this.activeTextDocument,io.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))}));let b=e.getFeature(Ie.DidOpenTextDocumentNotification.method);s.push(b.onNotificationSent(E=>{let L=E.textDocument;this.diagnosticRequestor.knowsSameVersion(Qe.document,L)||l(L)&&this.diagnosticRequestor.pull(L,()=>{p(L)})}));let C=e.getFeature(Ie.NotebookDocumentSyncRegistrationType.method);s.push(C.onOpenNotificationSent(E=>{for(let L of E.getCells())f(L)&&this.diagnosticRequestor.pull(L.document,()=>{p(L.document)})})),s.push(t.onOpen(E=>{for(let L of E){if(this.diagnosticRequestor.knows(Qe.document,L))continue;let Y=L.toString(),k;for(let le of Ne.workspace.textDocuments)if(Y===le.uri.toString()){k=le;break}k!==void 0&&l(k)&&this.diagnosticRequestor.pull(k,()=>{p(k)})}}));let j=new Set;for(let E of Ne.workspace.textDocuments)l(E)&&(this.diagnosticRequestor.pull(E,()=>{p(E)}),j.add(E.uri.toString()));for(let E of Ne.workspace.notebookDocuments)for(let L of E.getCells())f(L)&&(this.diagnosticRequestor.pull(L.document,()=>{p(L.document)}),j.add(L.document.uri.toString()));if(i.onTabs===!0)for(let E of t.getResources())!j.has(E.toString())&&l(E)&&this.diagnosticRequestor.pull(E,()=>{p(E)});if(i.onChange===!0){let E=e.getFeature(Ie.DidChangeTextDocumentNotification.method);s.push(E.onNotificationSent(async L=>{let Y=L.textDocument;m(Y,io.onType)&&this.diagnosticRequestor.pull(Y,()=>{this.backgroundScheduler.trigger()})})),s.push(C.onChangeNotificationSent(async L=>{let k=(L.cells?.textContent||[]).map(De=>L.notebook.getCells().find(vt=>vt.document.uri.toString()===De.document.uri.toString()));for(let De of k)De&&f(De)&&this.diagnosticRequestor.pull(De.document,()=>{this.backgroundScheduler.trigger()});let le=L.cells?.structure?.didClose||[];for(let De of le)this.diagnosticRequestor.forgetDocument(De.document);let ue=L.cells?.structure?.didOpen||[];for(let De of ue)f(De)&&this.diagnosticRequestor.pull(De.document,()=>{this.backgroundScheduler.trigger()})}))}if(i.onSave===!0){let E=e.getFeature(Ie.DidSaveTextDocumentNotification.method);s.push(E.onNotificationSent(L=>{let Y=L.textDocument;m(Y,io.onSave)&&this.diagnosticRequestor.pull(L.textDocument)})),s.push(C.onSaveNotificationSent(L=>{for(let Y of L.getCells())f(Y)&&this.diagnosticRequestor.pull(Y.document)}))}let U=e.getFeature(Ie.DidCloseTextDocumentNotification.method);s.push(U.onNotificationSent(E=>{this.cleanUpDocument(E.textDocument)})),s.push(C.onCloseNotificationSent(E=>{for(let L of E.getCells())this.cleanUpDocument(L.document)})),t.onClose(E=>{for(let L of E)this.cleanUpDocument(L)}),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(let E of Ne.workspace.textDocuments)l(E)&&this.diagnosticRequestor.pull(E)}),r.workspaceDiagnostics===!0&&r.identifier!=="da348dc5-c30a-4515-9d98-31ff3be38d14"&&this.diagnosticRequestor.pullWorkspace(),this.disposable=Ne.Disposable.from(...s,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(Qe.document,e)&&this.diagnosticRequestor.forgetDocument(e)}},pl=class extends ul.TextDocumentLanguageFeature{constructor(e){super(e,Ie.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=Ss(Ss(e,"textDocument"),"diagnostic");t.relatedInformation=!0,t.tagSupport={valueSet:[Ie.DiagnosticTag.Unnecessary,Ie.DiagnosticTag.Deprecated]},t.codeDescriptionSupport=!0,t.dataSupport=!0,t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,Ss(Ss(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(Ie.DiagnosticRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeDiagnosticsEmitter.fire()});let[i,o]=this.getRegistration(t,e.diagnosticProvider);!i||!o||this.register({id:i,registerOptions:o})}clear(){super.clear()}refresh(){for(let e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){let t=new hl(this._client,this._client.visibleDocuments,e);return[t.disposable,t]}};br.DiagnosticFeature=pl});var Ps=F(Xt=>{"use strict";y();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.Semaphore=Xt.Delayer=void 0;Xt.setTestMode=UC;Xt.clearTestMode=WC;Xt.map=$C;Xt.mapAsync=zC;Xt.forEach=KC;var so=oe(),ml=class{defaultDelay;timeout;completionPromise;onSuccess;task;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(r=>{this.onSuccess=r}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let r=this.task();return this.task=void 0,r})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,so.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 this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};Xt.Delayer=ml;var yl=class{_capacity;_active;_waiting;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,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,so.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Xt.Semaphore=yl;var vl=!1;function UC(){vl=!0}function WC(){vl=!1}var Hm=15,oo=class{yieldAfter;startTime;counter;total;counterInterval;constructor(e=Hm){this.yieldAfter=vl===!0?Math.max(e,2):Math.max(e,Hm),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){let 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=this.total*2;break}}return!1}};async function $C(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),o=new oo(r?.yieldAfter);function s(u){o.start();for(let l=u;l<n.length;l++)if(i[l]=e(n[l]),o.shouldYield())return r?.yieldCallback&&r.yieldCallback(),l+1;return-1}let a=s(0);for(;a!==-1&&!(t!==void 0&&t.isCancellationRequested);)a=await new Promise(u=>{(0,so.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(s(a))})});return i}async function zC(n,e,t,r){if(n.length===0)return[];let i=new Array(n.length),o=new oo(r?.yieldAfter);async function s(u){o.start();for(let l=u;l<n.length;l++)if(i[l]=await e(n[l],t),o.shouldYield())return r?.yieldCallback&&r.yieldCallback(),l+1;return-1}let a=await s(0);for(;a!==-1&&!(t!==void 0&&t.isCancellationRequested);)a=await new Promise(u=>{(0,so.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?u(-1):u(s(a))})});return i}async function KC(n,e,t,r){if(n.length===0)return;let i=new oo(r?.yieldAfter);function o(a){i.start();for(let u=a;u<n.length;u++)if(e(n[u]),i.shouldYield())return r?.yieldCallback&&r.yieldCallback(),u+1;return-1}let s=o(0);for(;s!==-1&&!(t!==void 0&&t.isCancellationRequested);)s=await new Promise(a=>{(0,so.RAL)().timer.setImmediate(()=>{t!==void 0&&t.isCancellationRequested?a(-1):a(o(s))})})}});var bl=F($n=>{"use strict";y();var BC=$n&&$n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),VC=$n&&$n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),GC=$n&&$n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&BC(t,e,r[i]);return VC(t,e),t}})();Object.defineProperty($n,"__esModule",{value:!0});var JC=GC(require("vscode")),_l=class extends JC.CompletionItem{data;fromEdit;documentationFormat;originalItemKind;deprecated;insertTextMode;constructor(e){super(e)}};$n.default=_l});var wl=F(zn=>{"use strict";y();var QC=zn&&zn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XC=zn&&zn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ZC=zn&&zn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&QC(t,e,r[i]);return XC(t,e),t}})();Object.defineProperty(zn,"__esModule",{value:!0});var YC=ZC(require("vscode")),Cl=class extends YC.CodeLens{data;constructor(e){super(e)}};zn.default=Cl});var Sl=F(Kn=>{"use strict";y();var ew=Kn&&Kn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),tw=Kn&&Kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),nw=Kn&&Kn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&ew(t,e,r[i]);return tw(t,e),t}})();Object.defineProperty(Kn,"__esModule",{value:!0});var rw=nw(require("vscode")),Dl=class extends rw.DocumentLink{data;constructor(e,t){super(e,t)}};Kn.default=Dl});var Rl=F(Bn=>{"use strict";y();var iw=Bn&&Bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ow=Bn&&Bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sw=Bn&&Bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&iw(t,e,r[i]);return ow(t,e),t}})();Object.defineProperty(Bn,"__esModule",{value:!0});var aw=sw(require("vscode")),Pl=class extends aw.CodeAction{data;constructor(e,t){super(e),this.data=t}};Bn.default=Pl});var ql=F(zt=>{"use strict";y();var cw=zt&&zt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),uw=zt&&zt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Wm=zt&&zt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&cw(t,e,r[i]);return uw(t,e),t}})();Object.defineProperty(zt,"__esModule",{value:!0});zt.ProtocolDiagnostic=zt.DiagnosticCode=void 0;var lw=Wm(require("vscode")),Tl=Wm(Qt()),Um;(function(n){function e(t){let r=t;return r!=null&&(Tl.number(r.value)||Tl.string(r.value))&&Tl.string(r.target)}n.is=e})(Um||(zt.DiagnosticCode=Um={}));var Ol=class extends lw.Diagnostic{data;hasDiagnosticCode;constructor(e,t,r,i){super(e,t,r),this.data=i,this.hasDiagnosticCode=!1}};zt.ProtocolDiagnostic=Ol});var Ml=F(Vn=>{"use strict";y();var dw=Vn&&Vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),fw=Vn&&Vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),hw=Vn&&Vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&dw(t,e,r[i]);return fw(t,e),t}})();Object.defineProperty(Vn,"__esModule",{value:!0});var pw=hw(require("vscode")),xl=class extends pw.CallHierarchyItem{data;constructor(e,t,r,i,o,s,a){super(e,t,r,i,o,s),a!==void 0&&(this.data=a)}};Vn.default=xl});var jl=F(Gn=>{"use strict";y();var gw=Gn&&Gn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),mw=Gn&&Gn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),yw=Gn&&Gn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&gw(t,e,r[i]);return mw(t,e),t}})();Object.defineProperty(Gn,"__esModule",{value:!0});var vw=yw(require("vscode")),El=class extends vw.TypeHierarchyItem{data;constructor(e,t,r,i,o,s,a){super(e,t,r,i,o,s),a!==void 0&&(this.data=a)}};Gn.default=El});var Il=F(Jn=>{"use strict";y();var _w=Jn&&Jn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),bw=Jn&&Jn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Cw=Jn&&Jn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&_w(t,e,r[i]);return bw(t,e),t}})();Object.defineProperty(Jn,"__esModule",{value:!0});var Rs=Cw(require("vscode")),Fl=class extends Rs.SymbolInformation{data;hasRange;constructor(e,t,r,i,o){let s=!(i instanceof Rs.Uri);super(e,t,r,s?i:new Rs.Location(i,new Rs.Range(0,0,0,0))),this.hasRange=s,o!==void 0&&(this.data=o)}};Jn.default=Fl});var kl=F(Qn=>{"use strict";y();var ww=Qn&&Qn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Dw=Qn&&Qn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Sw=Qn&&Qn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&ww(t,e,r[i]);return Dw(t,e),t}})();Object.defineProperty(Qn,"__esModule",{value:!0});var Pw=Sw(require("vscode")),Nl=class extends Pw.InlayHint{data;constructor(e,t,r){super(e,t,r)}};Qn.default=Nl});var Bm=F(Zt=>{"use strict";y();var Rw=Zt&&Zt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Tw=Zt&&Zt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ts=Zt&&Zt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&Rw(t,e,r[i]);return Tw(t,e),t}})(),Cr=Zt&&Zt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.createConverter=Iw;var Ke=Ts(require("vscode")),ie=Ts(oe()),Nr=Ts(Qt()),$m=Ts(Ps()),Ow=Cr(bl()),qw=Cr(wl()),xw=Cr(Sl()),zm=Cr(Rl()),Km=ql(),Mw=Cr(Ml()),Ew=Cr(jl()),jw=Cr(Il()),Fw=Cr(kl()),Al;(function(n){function e(t){let r=t;return r&&!!r.inserting&&!!r.replacing}n.is=e})(Al||(Al={}));function Iw(n){let t=n||(d=>d.toString());function r(d){return t(d)}function i(d){return{uri:t(d.uri)}}function o(d){return{uri:t(d.uri),languageId:d.languageId,version:d.version,text:d.getText()}}function s(d){return{uri:t(d.uri),version:d.version}}function a(d){return{textDocument:o(d)}}function u(d){let D=d;return!!D.document&&!!D.contentChanges}function l(d){let D=d;return!!D.uri&&!!D.version}function f(d,D,J){if(l(d))return{textDocument:{uri:t(d.uri),version:d.version},contentChanges:[{text:d.getText()}]};if(u(d)){let Te=D,be=J;return{textDocument:{uri:t(Te),version:be},contentChanges:d.contentChanges.map(Ct=>{let Fn=Ct.range;return{range:{start:{line:Fn.start.line,character:Fn.start.character},end:{line:Fn.end.line,character:Fn.end.character}},rangeLength:Ct.rangeLength,text:Ct.text}})}}else throw Error("Unsupported text document change parameter")}function h(d){return{textDocument:i(d)}}function p(d,D=!1){let J={textDocument:i(d)};return D&&(J.text=d.getText()),J}function m(d){switch(d){case Ke.TextDocumentSaveReason.Manual:return ie.TextDocumentSaveReason.Manual;case Ke.TextDocumentSaveReason.AfterDelay:return ie.TextDocumentSaveReason.AfterDelay;case Ke.TextDocumentSaveReason.FocusOut:return ie.TextDocumentSaveReason.FocusOut}return ie.TextDocumentSaveReason.Manual}function b(d){return{textDocument:i(d.document),reason:m(d.reason)}}function C(d){return{files:d.files.map(D=>({uri:t(D)}))}}function j(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function U(d){return{files:d.files.map(D=>({uri:t(D)}))}}function E(d){return{files:d.files.map(D=>({uri:t(D)}))}}function L(d){return{files:d.files.map(D=>({oldUri:t(D.oldUri),newUri:t(D.newUri)}))}}function Y(d){return{files:d.files.map(D=>({uri:t(D)}))}}function k(d,D){return{textDocument:i(d),position:P(D)}}function le(d){switch(d){case Ke.CompletionTriggerKind.TriggerCharacter:return ie.CompletionTriggerKind.TriggerCharacter;case Ke.CompletionTriggerKind.TriggerForIncompleteCompletions:return ie.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return ie.CompletionTriggerKind.Invoked}}function ue(d,D,J){return{textDocument:i(d),position:P(D),context:{triggerKind:le(J.triggerKind),triggerCharacter:J.triggerCharacter}}}function De(d){switch(d){case Ke.SignatureHelpTriggerKind.Invoke:return ie.SignatureHelpTriggerKind.Invoked;case Ke.SignatureHelpTriggerKind.TriggerCharacter:return ie.SignatureHelpTriggerKind.TriggerCharacter;case Ke.SignatureHelpTriggerKind.ContentChange:return ie.SignatureHelpTriggerKind.ContentChange}}function vt(d){return{label:d.label}}function on(d){return d.map(vt)}function H(d){return{label:d.label,parameters:on(d.parameters)}}function R(d){return d.map(H)}function V(d){return d===void 0?d:{signatures:R(d.signatures),activeSignature:d.activeSignature,activeParameter:d.activeParameter}}function K(d,D,J){return{textDocument:i(d),position:P(D),context:{isRetrigger:J.isRetrigger,triggerCharacter:J.triggerCharacter,triggerKind:De(J.triggerKind),activeSignatureHelp:V(J.activeSignatureHelp)}}}function P(d){return{line:d.line,character:d.character}}function M(d){return d==null?d:{line:d.line>ie.uinteger.MAX_VALUE?ie.uinteger.MAX_VALUE:d.line,character:d.character>ie.uinteger.MAX_VALUE?ie.uinteger.MAX_VALUE:d.character}}function I(d,D){return $m.map(d,M,D)}function z(d){return d.map(M)}function W(d){return d==null?d:{start:M(d.start),end:M(d.end)}}function B(d){return d.map(W)}function ne(d){return d==null?d:ie.Location.create(r(d.uri),W(d.range))}function se(d){switch(d){case Ke.DiagnosticSeverity.Error:return ie.DiagnosticSeverity.Error;case Ke.DiagnosticSeverity.Warning:return ie.DiagnosticSeverity.Warning;case Ke.DiagnosticSeverity.Information:return ie.DiagnosticSeverity.Information;case Ke.DiagnosticSeverity.Hint:return ie.DiagnosticSeverity.Hint}}function Ae(d){if(!d)return;let D=[];for(let J of d){let Te=me(J);Te!==void 0&&D.push(Te)}return D.length>0?D:void 0}function me(d){switch(d){case Ke.DiagnosticTag.Unnecessary:return ie.DiagnosticTag.Unnecessary;case Ke.DiagnosticTag.Deprecated:return ie.DiagnosticTag.Deprecated;default:return}}function Ye(d){return{message:d.message,location:ne(d.location)}}function qt(d){return d.map(Ye)}function Kr(d){if(d!=null)return Nr.number(d)||Nr.string(d)?d:{value:d.value,target:r(d.target)}}function tr(d){let D=ie.Diagnostic.create(W(d.range),d.message),J=d instanceof Km.ProtocolDiagnostic?d:void 0;J!==void 0&&J.data!==void 0&&(D.data=J.data);let Te=Kr(d.code);return Km.DiagnosticCode.is(Te)?J!==void 0&&J.hasDiagnosticCode?D.code=Te:(D.code=Te.value,D.codeDescription={href:Te.target}):D.code=Te,Nr.number(d.severity)&&(D.severity=se(d.severity)),Array.isArray(d.tags)&&(D.tags=Ae(d.tags)),d.relatedInformation&&(D.relatedInformation=qt(d.relatedInformation)),d.source&&(D.source=d.source),D}function nr(d,D){return d==null?d:$m.map(d,tr,D)}function rr(d){return d==null?d:d.map(tr)}function ji(d,D){switch(d){case"$string":return D;case ie.MarkupKind.PlainText:return{kind:d,value:D};case ie.MarkupKind.Markdown:return{kind:d,value:D.value};default:return`Unsupported Markup content received. Kind is: ${d}`}}function Br(d){if(d===Ke.CompletionItemTag.Deprecated)return ie.CompletionItemTag.Deprecated}function xt(d){if(d===void 0)return d;let D=[];for(let J of d){let Te=Br(J);Te!==void 0&&D.push(Te)}return D}function Fi(d,D){return D!==void 0?D:d+1}function sn(d,D=!1){let J,Te;Nr.string(d.label)?J=d.label:(J=d.label.label,D&&(d.label.detail!==void 0||d.label.description!==void 0)&&(Te={detail:d.label.detail,description:d.label.description}));let be={label:J};Te!==void 0&&(be.labelDetails=Te);let st=d instanceof Ow.default?d:void 0;d.detail&&(be.detail=d.detail),d.documentation&&(!st||st.documentationFormat==="$string"?be.documentation=d.documentation:be.documentation=ji(st.documentationFormat,d.documentation)),d.filterText&&(be.filterText=d.filterText),ir(be,d),Nr.number(d.kind)&&(be.kind=Fi(d.kind,st&&st.originalItemKind)),d.sortText&&(be.sortText=d.sortText),d.additionalTextEdits&&(be.additionalTextEdits=Vr(d.additionalTextEdits)),d.commitCharacters&&(be.commitCharacters=d.commitCharacters.slice()),d.command&&(be.command=_e(d.command)),(d.preselect===!0||d.preselect===!1)&&(be.preselect=d.preselect);let Ct=xt(d.tags);if(st){if(st.data!==void 0&&(be.data=st.data),st.deprecated===!0||st.deprecated===!1){if(st.deprecated===!0&&Ct!==void 0&&Ct.length>0){let Fn=Ct.indexOf(Ke.CompletionItemTag.Deprecated);Fn!==-1&&Ct.splice(Fn,1)}be.deprecated=st.deprecated}st.insertTextMode!==void 0&&(be.insertTextMode=st.insertTextMode)}return Ct!==void 0&&Ct.length>0&&(be.tags=Ct),be.insertTextMode===void 0&&d.keepWhitespace===!0&&(be.insertTextMode=ie.InsertTextMode.adjustIndentation),be}function ir(d,D){let J=ie.InsertTextFormat.PlainText,Te,be;D.textEdit?(Te=D.textEdit.newText,be=D.textEdit.range):D.insertText instanceof Ke.SnippetString?(J=ie.InsertTextFormat.Snippet,Te=D.insertText.value):Te=D.insertText,D.range&&(be=D.range),d.insertTextFormat=J,D.fromEdit&&Te!==void 0&&be!==void 0?d.textEdit=or(Te,be):d.insertText=Te}function or(d,D){return Al.is(D)?ie.InsertReplaceEdit.create(d,W(D.inserting),W(D.replacing)):{newText:d,range:W(D)}}function Mn(d){return{range:W(d.range),newText:d.newText}}function Vr(d){return d==null?d:d.map(Mn)}function at(d){return d<=Ke.SymbolKind.TypeParameter?d+1:ie.SymbolKind.Property}function Bt(d){return d}function ct(d){return d.map(Bt)}function Ii(d,D,J){return{textDocument:i(d),position:P(D),context:{includeDeclaration:J.includeDeclaration}}}async function ot(d,D){let J=ie.CodeAction.create(d.title);if(d instanceof zm.default&&d.data!==void 0&&(J.data=d.data),d.kind!==void 0&&(J.kind=At(d.kind)),d.diagnostics!==void 0&&(J.diagnostics=await nr(d.diagnostics,D)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(J.command=_e(d.command)),d.isPreferred!==void 0&&(J.isPreferred=d.isPreferred),d.disabled!==void 0&&(J.disabled={reason:d.disabled.reason}),d.isAI&&(J.tags??=[],J.tags.push(ie.CodeActionTag.LLMGenerated)),J}function En(d){let D=ie.CodeAction.create(d.title);if(d instanceof zm.default&&d.data!==void 0&&(D.data=d.data),d.kind!==void 0&&(D.kind=At(d.kind)),d.diagnostics!==void 0&&(D.diagnostics=rr(d.diagnostics)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(D.command=_e(d.command)),d.isPreferred!==void 0&&(D.isPreferred=d.isPreferred),d.disabled!==void 0&&(D.disabled={reason:d.disabled.reason}),d.isAI&&(D.tags??=[],D.tags.push(ie.CodeActionTag.LLMGenerated)),D}async function Gr(d,D){if(d==null)return d;let J;return d.only&&Nr.string(d.only.value)&&(J=[d.only.value]),ie.CodeActionContext.create(await nr(d.diagnostics,D),J,sr(d.triggerKind))}function Tr(d){if(d==null)return d;let D;return d.only&&Nr.string(d.only.value)&&(D=[d.only.value]),ie.CodeActionContext.create(rr(d.diagnostics),D,sr(d.triggerKind))}function sr(d){switch(d){case Ke.CodeActionTriggerKind.Invoke:return ie.CodeActionTriggerKind.Invoked;case Ke.CodeActionTriggerKind.Automatic:return ie.CodeActionTriggerKind.Automatic;default:return}}function At(d){if(d!=null)return d.value}function v(d){return ie.InlineValueContext.create(d.frameId,W(d.stoppedLocation))}function O(d,D,J){return{textDocument:i(d),position:M(D),context:A(J)}}function A(d){return{triggerKind:Q(d.triggerKind),selectedCompletionInfo:he(d.selectedCompletionInfo)}}function Q(d){switch(d){case Ke.InlineCompletionTriggerKind.Invoke:return ie.InlineCompletionTriggerKind.Invoked;case Ke.InlineCompletionTriggerKind.Automatic:return ie.InlineCompletionTriggerKind.Automatic}}function he(d){if(d!=null)return{range:W(d.range),text:d.text}}function _e(d){let D=ie.Command.create(d.title,d.command);return d.tooltip&&(D.tooltip=d.tooltip),d.arguments&&(D.arguments=d.arguments),D}function ye(d){let D=ie.CodeLens.create(W(d.range));return d.command&&(D.command=_e(d.command)),d instanceof qw.default&&d.data&&(D.data=d.data),D}function Le(d,D){let J={tabSize:d.tabSize,insertSpaces:d.insertSpaces};return D.trimTrailingWhitespace&&(J.trimTrailingWhitespace=!0),D.trimFinalNewlines&&(J.trimFinalNewlines=!0),D.insertFinalNewline&&(J.insertFinalNewline=!0),J}function Ve(d){return{textDocument:i(d)}}function Re(d){return{textDocument:i(d)}}function xe(d){let D=ie.DocumentLink.create(W(d.range));d.target&&(D.target=r(d.target)),d.tooltip!==void 0&&(D.tooltip=d.tooltip);let J=d instanceof xw.default?d:void 0;return J&&J.data&&(D.data=J.data),D}function ut(d){return{textDocument:i(d)}}function _t(d){let D={name:d.name,kind:at(d.kind),uri:r(d.uri),range:W(d.range),selectionRange:W(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=ct(d.tags)),d instanceof Mw.default&&d.data!==void 0&&(D.data=d.data),D}function jn(d){let D={name:d.name,kind:at(d.kind),uri:r(d.uri),range:W(d.range),selectionRange:W(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(D.detail=d.detail),d.tags!==void 0&&(D.tags=ct(d.tags)),d instanceof Ew.default&&d.data!==void 0&&(D.data=d.data),D}function Mt(d){let D=d instanceof jw.default?{name:d.name,kind:at(d.kind),location:d.hasRange?ne(d.location):{uri:t(d.location.uri)},data:d.data}:{name:d.name,kind:at(d.kind),location:ne(d.location)};return d.tags!==void 0&&(D.tags=ct(d.tags)),d.containerName!==""&&(D.containerName=d.containerName),D}function bt(d){let D=typeof d.label=="string"?d.label:d.label.map(Jr),J=ie.InlayHint.create(M(d.position),D);return d.kind!==void 0&&(J.kind=d.kind),d.textEdits!==void 0&&(J.textEdits=Vr(d.textEdits)),d.tooltip!==void 0&&(J.tooltip=Oo(d.tooltip)),d.paddingLeft!==void 0&&(J.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&(J.paddingRight=d.paddingRight),d instanceof Fw.default&&d.data!==void 0&&(J.data=d.data),J}function Jr(d){let D=ie.InlayHintLabelPart.create(d.value);return d.location!==void 0&&(D.location=ne(d.location)),d.command!==void 0&&(D.command=_e(d.command)),d.tooltip!==void 0&&(D.tooltip=Oo(d.tooltip)),D}function Oo(d){return typeof d=="string"?d:{kind:ie.MarkupKind.Markdown,value:d.value}}return{asUri:r,asTextDocumentIdentifier:i,asTextDocumentItem:o,asVersionedTextDocumentIdentifier:s,asOpenTextDocumentParams:a,asChangeTextDocumentParams:f,asCloseTextDocumentParams:h,asSaveTextDocumentParams:p,asWillSaveTextDocumentParams:b,asDidCreateFilesParams:C,asDidRenameFilesParams:j,asDidDeleteFilesParams:U,asWillCreateFilesParams:E,asWillRenameFilesParams:L,asWillDeleteFilesParams:Y,asTextDocumentPositionParams:k,asCompletionParams:ue,asSignatureHelpParams:K,asWorkerPosition:P,asRange:W,asRanges:B,asPosition:M,asPositions:I,asPositionsSync:z,asLocation:ne,asDiagnosticSeverity:se,asDiagnosticTag:me,asDiagnostic:tr,asDiagnostics:nr,asDiagnosticsSync:rr,asCompletionItem:sn,asTextEdit:Mn,asSymbolKind:at,asSymbolTag:Bt,asSymbolTags:ct,asReferenceParams:Ii,asCodeAction:ot,asCodeActionSync:En,asCodeActionContext:Gr,asCodeActionContextSync:Tr,asInlineValueContext:v,asCommand:_e,asCodeLens:ye,asFormattingOptions:Le,asDocumentSymbolParams:Ve,asCodeLensParams:Re,asDocumentLink:xe,asDocumentLinkParams:ut,asCallHierarchyItem:_t,asTypeHierarchyItem:jn,asInlayHint:bt,asWorkspaceSymbol:Mt,asInlineCompletionParams:O,asInlineCompletionContext:A}}});var Jm=F(Yt=>{"use strict";y();var Nw=Yt&&Yt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kw=Yt&&Yt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qs=Yt&&Yt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&Nw(t,e,r[i]);return kw(t,e),t}})(),wr=Yt&&Yt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.createConverter=Bw;var $=qs(require("vscode")),ee=qs(oe()),Ft=qs(Qt()),ve=qs(Ps()),Aw=wr(bl()),Lw=wr(wl()),Hw=wr(Sl()),Uw=wr(Rl()),Vm=ql(),Ww=wr(Ml()),$w=wr(jl()),zw=wr(Il()),Kw=wr(kl()),Gm=oe(),Os;(function(n){function e(t){let r=t;return r&&Ft.string(r.language)&&Ft.string(r.value)}n.is=e})(Os||(Os={}));function Bw(n,e,t,r){let o=n||(c=>$.Uri.parse(c));function s(c){return o(c)}function a(c){let _=[];for(let x of c)if(typeof x=="string")_.push(x);else if(Gm.NotebookCellTextDocumentFilter.is(x))if(typeof x.notebook=="string")_.push({notebookType:x.notebook,language:x.language});else{let G=x.notebook.notebookType??"*";_.push({notebookType:G,scheme:x.notebook.scheme,pattern:la(x.notebook.pattern),language:x.language})}else Gm.TextDocumentFilter.is(x)&&_.push({language:x.language,scheme:x.scheme,pattern:la(x.pattern)});return _}async function u(c,_){return ve.map(c,f,_)}function l(c){let _=new Array(c.length);for(let x=0;x<c.length;x++)_[x]=f(c[x]);return _}function f(c){let _=new Vm.ProtocolDiagnostic(C(c.range),c.message,U(c.severity),c.data);if(c.code!==void 0){if(typeof c.code=="string"||typeof c.code=="number")ee.CodeDescription.is(c.codeDescription)?_.code={value:c.code,target:s(c.codeDescription.href)}:_.code=c.code;else if(Vm.DiagnosticCode.is(c.code)){_.hasDiagnosticCode=!0;let x=c.code;_.code={value:x.value,target:s(x.target)}}}return c.source&&(_.source=c.source),c.relatedInformation&&(_.relatedInformation=h(c.relatedInformation)),Array.isArray(c.tags)&&(_.tags=p(c.tags)),_}function h(c){let _=new Array(c.length);for(let x=0;x<c.length;x++){let G=c[x];_[x]=new $.DiagnosticRelatedInformation(Ye(G.location),G.message)}return _}function p(c){if(!c)return;let _=[];for(let x of c){let G=m(x);G!==void 0&&_.push(G)}return _.length>0?_:void 0}function m(c){switch(c){case ee.DiagnosticTag.Unnecessary:return $.DiagnosticTag.Unnecessary;case ee.DiagnosticTag.Deprecated:return $.DiagnosticTag.Deprecated;default:return}}function b(c){return c?new $.Position(c.line,c.character):void 0}function C(c){return c?new $.Range(c.start.line,c.start.character,c.end.line,c.end.character):void 0}async function j(c,_){return ve.map(c,x=>new $.Range(x.start.line,x.start.character,x.end.line,x.end.character),_)}function U(c){if(c==null)return $.DiagnosticSeverity.Error;switch(c){case ee.DiagnosticSeverity.Error:return $.DiagnosticSeverity.Error;case ee.DiagnosticSeverity.Warning:return $.DiagnosticSeverity.Warning;case ee.DiagnosticSeverity.Information:return $.DiagnosticSeverity.Information;case ee.DiagnosticSeverity.Hint:return $.DiagnosticSeverity.Hint}return $.DiagnosticSeverity.Error}function E(c){if(Ft.string(c))return Y(c);if(Os.is(c))return Y().appendCodeblock(c.value,c.language);if(Array.isArray(c)){let _=[];for(let x of c){let G=Y();Os.is(x)?G.appendCodeblock(x.value,x.language):G.appendMarkdown(x),_.push(G)}return _}else return Y(c)}function L(c){if(Ft.string(c))return c;switch(c.kind){case ee.MarkupKind.Markdown:return Y(c.value);case ee.MarkupKind.PlainText:return c.value;default:return`Unsupported Markup content received. Kind is: ${c.kind}`}}function Y(c){let _;if(c===void 0||typeof c=="string")_=new $.MarkdownString(c);else switch(c.kind){case ee.MarkupKind.Markdown:_=new $.MarkdownString(c.value);break;case ee.MarkupKind.PlainText:_=new $.MarkdownString,_.appendText(c.value);break;default:_=new $.MarkdownString,_.appendText(`Unsupported Markup content received. Kind is: ${c.kind}`);break}return _.isTrusted=e,_.supportHtml=t,_.supportThemeIcons=r,_}function k(c){if(c)return new $.Hover(E(c.contents),C(c.range))}async function le(c,_,x){if(!c)return;if(Array.isArray(c))return ve.map(c,In=>H(In,_),x);let G=c,{defaultRange:He,commitCharacters:Be}=ue(G,_),Oe=await ve.map(G.items,In=>H(In,Be,G.applyKind?.commitCharacters,He,G.itemDefaults?.insertTextMode,G.itemDefaults?.insertTextFormat,G.itemDefaults?.data,G.applyKind?.data),x);return new $.CompletionList(Oe,G.isIncomplete)}function ue(c,_){let x=c.itemDefaults?.editRange,G=c.itemDefaults?.commitCharacters??_;return ee.Range.is(x)?{defaultRange:C(x),commitCharacters:G}:x!==void 0?{defaultRange:{inserting:C(x.insert),replacing:C(x.replace)},commitCharacters:G}:{defaultRange:void 0,commitCharacters:G}}function De(c){return ee.CompletionItemKind.Text<=c&&c<=ee.CompletionItemKind.TypeParameter?[c-1,void 0]:[$.CompletionItemKind.Text,c]}function vt(c){if(c===ee.CompletionItemTag.Deprecated)return $.CompletionItemTag.Deprecated}function on(c){if(c==null)return[];let _=[];for(let x of c){let G=vt(x);G!==void 0&&_.push(G)}return _}function H(c,_,x,G,He,Be,Oe,In){let ar=on(c.tags),Lt=K(c),Ge=new Aw.default(Lt);c.detail&&(Ge.detail=c.detail),c.documentation&&(Ge.documentation=L(c.documentation),Ge.documentationFormat=Ft.string(c.documentation)?"$string":c.documentation.kind),c.filterText&&(Ge.filterText=c.filterText);let qo=P(c,G,Be);if(qo&&(Ge.insertText=qo.text,Ge.range=qo.range,Ge.fromEdit=qo.fromEdit),Ft.number(c.kind)){let[Iv,Kf]=De(c.kind);Ge.kind=Iv,Kf&&(Ge.originalItemKind=Kf)}c.sortText&&(Ge.sortText=c.sortText),c.additionalTextEdits&&(Ge.additionalTextEdits=W(c.additionalTextEdits));let $f=R(c,_,x);$f&&(Ge.commitCharacters=$f.slice()),c.command&&(Ge.command=ct(c.command)),(c.deprecated===!0||c.deprecated===!1)&&(Ge.deprecated=c.deprecated,c.deprecated===!0&&ar.push($.CompletionItemTag.Deprecated)),(c.preselect===!0||c.preselect===!1)&&(Ge.preselect=c.preselect);let zf=V(c,Oe,In);zf!==void 0&&(Ge.data=zf),ar.length>0&&(Ge.tags=ar);let fa=c.insertTextMode??He;return fa!==void 0&&(Ge.insertTextMode=fa,fa===ee.InsertTextMode.asIs&&(Ge.keepWhitespace=!0)),Ge}function R(c,_,x){if(x===ee.ApplyKind.Merge){if(!_&&!c.commitCharacters)return;let G=new Set;if(_)for(let He of _)G.add(He);if(Ft.stringArray(c.commitCharacters))for(let He of c.commitCharacters)G.add(He);return Array.from(G)}return c.commitCharacters!==void 0?Ft.stringArray(c.commitCharacters)?c.commitCharacters:void 0:_}function V(c,_,x){if(x===ee.ApplyKind.Merge){let G={..._};return c.data&&Object.entries(c.data).forEach(([He,Be])=>{Be!=null&&(G[He]=Be)}),G}return c.data??_}function K(c){return ee.CompletionItemLabelDetails.is(c.labelDetails)?{label:c.label,detail:c.labelDetails.detail,description:c.labelDetails.description}:c.label}function P(c,_,x){let G=c.insertTextFormat??x;if(c.textEdit!==void 0||_!==void 0){let[He,Be]=c.textEdit!==void 0?M(c.textEdit):[_,c.textEditText??c.label];return G===ee.InsertTextFormat.Snippet?{text:new $.SnippetString(Be),range:He,fromEdit:!0}:{text:Be,range:He,fromEdit:!0}}else return c.insertText?G===ee.InsertTextFormat.Snippet?{text:new $.SnippetString(c.insertText),fromEdit:!1}:{text:c.insertText,fromEdit:!1}:void 0}function M(c){return ee.InsertReplaceEdit.is(c)?[{inserting:C(c.insert),replacing:C(c.replace)},c.newText]:[C(c.range),c.newText]}function I(c){if(c)return new $.TextEdit(C(c.range),c.newText)}async function z(c,_){if(c)return ve.map(c,I,_)}function W(c){if(!c)return;let _=new Array(c.length);for(let x=0;x<c.length;x++)_[x]=I(c[x]);return _}async function B(c,_){if(!c)return;let x=new $.SignatureHelp;return Ft.number(c.activeSignature)?x.activeSignature=c.activeSignature:x.activeSignature=0,Ft.number(c.activeParameter)?x.activeParameter=c.activeParameter:c.activeParameter===null?x.activeParameter=-1:x.activeParameter=0,c.signatures&&(x.signatures=await ne(c.signatures,_)),x}async function ne(c,_){return ve.mapAsync(c,se,_)}async function se(c,_){let x=new $.SignatureInformation(c.label);return c.documentation!==void 0&&(x.documentation=L(c.documentation)),c.parameters!==void 0&&(x.parameters=await Ae(c.parameters,_)),c.activeParameter!==void 0&&(x.activeParameter=c.activeParameter??-1),x}function Ae(c,_){return ve.map(c,me,_)}function me(c){let _=new $.ParameterInformation(c.label);return c.documentation&&(_.documentation=L(c.documentation)),_}function Ye(c){return c?new $.Location(o(c.uri),C(c.range)):void 0}async function qt(c,_){if(c)return nr(c,_)}async function Kr(c,_){if(c)return nr(c,_)}function tr(c){if(!c)return;let _={targetUri:o(c.targetUri),targetRange:C(c.targetRange),originSelectionRange:C(c.originSelectionRange),targetSelectionRange:C(c.targetSelectionRange)};if(!_.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return _}async function nr(c,_){if(c)if(Ft.array(c)){if(c.length===0)return[];if(ee.LocationLink.is(c[0])){let x=c;return ve.map(x,tr,_)}else{let x=c;return ve.map(x,Ye,_)}}else return ee.LocationLink.is(c)?[tr(c)]:Ye(c)}async function rr(c,_){if(c)return ve.map(c,Ye,_)}async function ji(c,_){if(c)return ve.map(c,Br,_)}function Br(c){let _=new $.DocumentHighlight(C(c.range));return Ft.number(c.kind)&&(_.kind=xt(c.kind)),_}function xt(c){switch(c){case ee.DocumentHighlightKind.Text:return $.DocumentHighlightKind.Text;case ee.DocumentHighlightKind.Read:return $.DocumentHighlightKind.Read;case ee.DocumentHighlightKind.Write:return $.DocumentHighlightKind.Write}return $.DocumentHighlightKind.Text}async function Fi(c,_){if(c)return ve.map(c,Mn,_)}function sn(c){return c<=ee.SymbolKind.TypeParameter?c-1:$.SymbolKind.Property}function ir(c){if(c===ee.SymbolTag.Deprecated)return $.SymbolTag.Deprecated}function or(c){if(c==null)return;let _=[];for(let x of c){let G=ir(x);G!==void 0&&_.push(G)}return _.length===0?void 0:_}function Mn(c){let _=c.data,x=c.location,G=x.range===void 0||_!==void 0?new zw.default(c.name,sn(c.kind),c.containerName??"",x.range===void 0?o(x.uri):new $.Location(o(c.location.uri),C(x.range)),_):new $.SymbolInformation(c.name,sn(c.kind),c.containerName??"",new $.Location(o(c.location.uri),C(x.range)));return Bt(G,c),G}async function Vr(c,_){if(c!=null)return ve.map(c,at,_)}function at(c){let _=new $.DocumentSymbol(c.name,c.detail||"",sn(c.kind),C(c.range),C(c.selectionRange));if(Bt(_,c),c.children!==void 0&&c.children.length>0){let x=[];for(let G of c.children)x.push(at(G));_.children=x}return _}function Bt(c,_){c.tags=or(_.tags),_.deprecated&&(c.tags?c.tags.includes($.SymbolTag.Deprecated)||(c.tags=c.tags.concat($.SymbolTag.Deprecated)):c.tags=[$.SymbolTag.Deprecated])}function ct(c){let _={title:c.title,command:c.command};return c.tooltip&&(_.tooltip=c.tooltip),c.arguments&&(_.arguments=c.arguments),_}async function Ii(c,_){if(c)return ve.map(c,ct,_)}let ot=new Map;ot.set(ee.CodeActionKind.Empty,$.CodeActionKind.Empty),ot.set(ee.CodeActionKind.QuickFix,$.CodeActionKind.QuickFix),ot.set(ee.CodeActionKind.Refactor,$.CodeActionKind.Refactor),ot.set(ee.CodeActionKind.RefactorExtract,$.CodeActionKind.RefactorExtract),ot.set(ee.CodeActionKind.RefactorInline,$.CodeActionKind.RefactorInline),ot.set(ee.CodeActionKind.RefactorRewrite,$.CodeActionKind.RefactorRewrite),ot.set(ee.CodeActionKind.Source,$.CodeActionKind.Source),ot.set(ee.CodeActionKind.SourceOrganizeImports,$.CodeActionKind.SourceOrganizeImports);function En(c){if(c==null)return;let _=ot.get(c);if(_)return _;let x=c.split(".");_=$.CodeActionKind.Empty;for(let G of x)_=_.append(G);return _}function Gr(c){if(c!=null)return c.map(_=>En(_))}function Tr(c){if(c!=null)return c.map(_=>({kind:En(_.kind),command:ct(_.command)}))}async function sr(c,_){if(c==null)return;let x=new Uw.default(c.title,c.data);return c.kind!==void 0&&(x.kind=En(c.kind)),c.diagnostics!==void 0&&(x.diagnostics=l(c.diagnostics)),c.edit!==void 0&&(x.edit=await A(c.edit,_)),c.command!==void 0&&(x.command=ct(c.command)),c.isPreferred!==void 0&&(x.isPreferred=c.isPreferred),c.disabled!==void 0&&(x.disabled={reason:c.disabled.reason}),c.tags?.includes(ee.CodeActionTag.LLMGenerated)&&(x.isAI=!0),x}function At(c,_){return ve.mapAsync(c,async x=>ee.Command.is(x)?ct(x):sr(x,_),_)}function v(c){if(!c)return;let _=new Lw.default(C(c.range));return c.command&&(_.command=ct(c.command)),c.data!==void 0&&c.data!==null&&(_.data=c.data),_}async function O(c,_){if(c)return ve.map(c,v,_)}async function A(c,_){if(!c)return;let x=new Map;if(c.changeAnnotations!==void 0){let Be=c.changeAnnotations;await ve.forEach(Object.keys(Be),Oe=>{let In=Q(Be[Oe]);x.set(Oe,In)},_)}let G=Be=>{if(Be!==void 0)return x.get(Be)},He=new $.WorkspaceEdit;if(c.documentChanges){let Be=c.documentChanges;await ve.forEach(Be,Oe=>{if(ee.CreateFile.is(Oe))He.createFile(o(Oe.uri),Oe.options,G(Oe.annotationId));else if(ee.RenameFile.is(Oe))He.renameFile(o(Oe.oldUri),o(Oe.newUri),Oe.options,G(Oe.annotationId));else if(ee.DeleteFile.is(Oe))He.deleteFile(o(Oe.uri),Oe.options,G(Oe.annotationId));else if(ee.TextDocumentEdit.is(Oe)){let In=o(Oe.textDocument.uri),ar=[];for(let Lt of Oe.edits)ee.AnnotatedTextEdit.is(Lt)?ar.push([new $.TextEdit(C(Lt.range),Lt.newText),G(Lt.annotationId)]):ee.SnippetTextEdit.is(Lt)?ar.push([new $.SnippetTextEdit(C(Lt.range),new $.SnippetString(Lt.snippet.value)),G(Lt.annotationId)]):ar.push([new $.TextEdit(C(Lt.range),Lt.newText),void 0]);He.set(In,ar)}else throw new Error(`Unknown workspace edit change received:
|
|
14
|
+
${JSON.stringify(Oe,void 0,4)}`)},_)}else if(c.changes){let Be=c.changes;await ve.forEach(Object.keys(Be),Oe=>{He.set(o(Oe),W(Be[Oe]))},_)}return He}function Q(c){if(c!==void 0)return{label:c.label,needsConfirmation:!!c.needsConfirmation,description:c.description}}function he(c){let _=C(c.range),x=c.target?s(c.target):void 0,G=new Hw.default(_,x);return c.tooltip!==void 0&&(G.tooltip=c.tooltip),c.data!==void 0&&c.data!==null&&(G.data=c.data),G}async function _e(c,_){if(c)return ve.map(c,he,_)}function ye(c){return new $.Color(c.red,c.green,c.blue,c.alpha)}function Le(c){return new $.ColorInformation(C(c.range),ye(c.color))}async function Ve(c,_){if(c)return ve.map(c,Le,_)}function Re(c){let _=new $.ColorPresentation(c.label);return _.additionalTextEdits=W(c.additionalTextEdits),c.textEdit&&(_.textEdit=I(c.textEdit)),_}async function xe(c,_){if(c)return ve.map(c,Re,_)}function ut(c){if(c)switch(c){case ee.FoldingRangeKind.Comment:return $.FoldingRangeKind.Comment;case ee.FoldingRangeKind.Imports:return $.FoldingRangeKind.Imports;case ee.FoldingRangeKind.Region:return $.FoldingRangeKind.Region}}function _t(c){return new $.FoldingRange(c.startLine,c.endLine,ut(c.kind))}async function jn(c,_){if(c)return ve.map(c,_t,_)}function Mt(c){return new $.SelectionRange(C(c.range),c.parent?Mt(c.parent):void 0)}async function bt(c,_){return Array.isArray(c)?ve.map(c,Mt,_):[]}function Jr(c){return ee.InlineValueText.is(c)?new $.InlineValueText(C(c.range),c.text):ee.InlineValueVariableLookup.is(c)?new $.InlineValueVariableLookup(C(c.range),c.variableName,c.caseSensitiveLookup):new $.InlineValueEvaluatableExpression(C(c.range),c.expression)}async function Oo(c,_){return Array.isArray(c)?ve.map(c,Jr,_):[]}async function d(c,_){let x=typeof c.label=="string"?c.label:await ve.map(c.label,D,_),G=new Kw.default(b(c.position),x);return c.kind!==void 0&&(G.kind=c.kind),c.textEdits!==void 0&&(G.textEdits=await z(c.textEdits,_)),c.tooltip!==void 0&&(G.tooltip=J(c.tooltip)),c.paddingLeft!==void 0&&(G.paddingLeft=c.paddingLeft),c.paddingRight!==void 0&&(G.paddingRight=c.paddingRight),c.data!==void 0&&(G.data=c.data),G}function D(c){let _=new $.InlayHintLabelPart(c.value);return c.location!==void 0&&(_.location=Ye(c.location)),c.tooltip!==void 0&&(_.tooltip=J(c.tooltip)),c.command!==void 0&&(_.command=ct(c.command)),_}function J(c){return typeof c=="string"?c:Y(c)}async function Te(c,_){if(Array.isArray(c))return ve.mapAsync(c,d,_)}function be(c){if(c===null)return;let _=new Ww.default(sn(c.kind),c.name,c.detail||"",s(c.uri),C(c.range),C(c.selectionRange),c.data);return c.tags!==void 0&&(_.tags=or(c.tags)),_}async function st(c,_){if(c!==null)return ve.map(c,be,_)}async function Ct(c,_){return new $.CallHierarchyIncomingCall(be(c.from),await j(c.fromRanges,_))}async function Fn(c,_){if(c!==null)return ve.mapAsync(c,Ct,_)}async function Hf(c,_){return new $.CallHierarchyOutgoingCall(be(c.to),await j(c.fromRanges,_))}async function Tv(c,_){if(c!==null)return ve.mapAsync(c,Hf,_)}async function Ov(c,_){if(c!=null)return new $.SemanticTokens(new Uint32Array(c.data),c.resultId)}function Uf(c){return new $.SemanticTokensEdit(c.start,c.deleteCount,c.data!==void 0?new Uint32Array(c.data):void 0)}async function qv(c,_){if(c!=null)return new $.SemanticTokensEdits(c.edits.map(Uf),c.resultId)}function xv(c){return c}async function Mv(c,_){if(c!=null)return new $.LinkedEditingRanges(await j(c.ranges,_),Ev(c.wordPattern))}function Ev(c){if(c!=null)return new RegExp(c)}function Wf(c){if(c===null)return;let _=new $w.default(sn(c.kind),c.name,c.detail||"",s(c.uri),C(c.range),C(c.selectionRange),c.data);return c.tags!==void 0&&(_.tags=or(c.tags)),_}async function jv(c,_){if(c!==null)return ve.map(c,Wf,_)}function la(c){if(Ft.string(c))return c;if(ee.RelativePattern.is(c)){if(ee.URI.is(c.baseUri))return new $.RelativePattern(s(c.baseUri),c.pattern);if(ee.WorkspaceFolder.is(c.baseUri)){let _=$.workspace.getWorkspaceFolder(s(c.baseUri.uri));return _!==void 0?new $.RelativePattern(_,c.pattern):void 0}}}async function Fv(c,_){if(!c)return;if(Array.isArray(c))return ve.map(c,He=>da(He),_);let x=c,G=await ve.map(x.items,He=>da(He),_);return new $.InlineCompletionList(G)}function da(c){let _;typeof c.insertText=="string"?_=c.insertText:_=new $.SnippetString(c.insertText.value);let x;c.command&&(x=ct(c.command));let G=new $.InlineCompletionItem(_,C(c.range),x);return c.filterText&&(G.filterText=c.filterText),G}return{asUri:s,asDocumentSelector:a,asDiagnostics:u,asDiagnostic:f,asRange:C,asRanges:j,asPosition:b,asDiagnosticSeverity:U,asDiagnosticTag:m,asHover:k,asCompletionResult:le,asCompletionItem:H,asTextEdit:I,asTextEdits:z,asSignatureHelp:B,asSignatureInformations:ne,asSignatureInformation:se,asParameterInformations:Ae,asParameterInformation:me,asDeclarationResult:qt,asDefinitionResult:Kr,asLocation:Ye,asReferences:rr,asDocumentHighlights:ji,asDocumentHighlight:Br,asDocumentHighlightKind:xt,asSymbolKind:sn,asSymbolTag:ir,asSymbolTags:or,asSymbolInformations:Fi,asSymbolInformation:Mn,asDocumentSymbols:Vr,asDocumentSymbol:at,asCommand:ct,asCommands:Ii,asCodeAction:sr,asCodeActionKind:En,asCodeActionKinds:Gr,asCodeActionDocumentations:Tr,asCodeActionResult:At,asCodeLens:v,asCodeLenses:O,asWorkspaceEdit:A,asDocumentLink:he,asDocumentLinks:_e,asFoldingRangeKind:ut,asFoldingRange:_t,asFoldingRanges:jn,asColor:ye,asColorInformation:Le,asColorInformations:Ve,asColorPresentation:Re,asColorPresentations:xe,asSelectionRange:Mt,asSelectionRanges:bt,asInlineValue:Jr,asInlineValues:Oo,asInlayHint:d,asInlayHints:Te,asSemanticTokensLegend:xv,asSemanticTokens:Ov,asSemanticTokensEdit:Uf,asSemanticTokensEdits:qv,asCallHierarchyItem:be,asCallHierarchyItems:st,asCallHierarchyIncomingCall:Ct,asCallHierarchyIncomingCalls:Fn,asCallHierarchyOutgoingCall:Hf,asCallHierarchyOutgoingCalls:Tv,asLinkedEditingRanges:Mv,asTypeHierarchyItem:Wf,asTypeHierarchyItems:jv,asGlobPattern:la,asInlineCompletionResult:Fv,asInlineCompletionItem:da}}});var Hl=F(ln=>{"use strict";y();var Vw=ln&&ln.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Gw=ln&&ln.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Jw=ln&&ln.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&Vw(t,e,r[i]);return Gw(t,e),t}})();Object.defineProperty(ln,"__esModule",{value:!0});ln.ProgressPart=void 0;var Qm=require("vscode"),Xm=oe(),Zm=Jw(Qt()),Ll=class{_client;_token;_infinite;_reported;_lspProgressDisposable;_progress;_cancellationToken;_tokenDisposable;_resolve;_reject;constructor(e,t,r){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(Xm.WorkDoneProgress.type,this._token,i=>{switch(i.kind){case"begin":this.begin(i);break;case"report":this.report(i);break;case"end":this.done(),r&&r(this);break}})}begin(e){this._infinite=e.percentage===void 0,this._lspProgressDisposable!==void 0&&Qm.window.withProgress({location:Qm.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(t,r)=>{if(this._lspProgressDisposable!==void 0)return this._progress=t,this._cancellationToken=r,this._tokenDisposable=this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(Xm.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((i,o)=>{this._resolve=i,this._reject=o})})}report(e){if(this._infinite&&Zm.string(e.message))this._progress!==void 0&&this._progress.report({message:e.message});else if(Zm.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),r=Math.max(0,t-this._reported);this._reported+=r,this._progress!==void 0&&this._progress.report({message:e.message,increment:r})}}cancel(){this.cleanup(),this._reject!==void 0&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),this._resolve!==void 0&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){this._lspProgressDisposable!==void 0&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),this._tokenDisposable!==void 0&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}};ln.ProgressPart=Ll});var ty=F(dn=>{"use strict";y();var Qw=dn&&dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Xw=dn&&dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),js=dn&&dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&Qw(t,e,r[i]);return Xw(t,e),t}})();Object.defineProperty(dn,"__esModule",{value:!0});dn.NotebookDocumentSyncFeature=void 0;var ke=js(require("vscode")),Xn=js(oe()),Zw=js(Fe()),Ym=js(Qt()),Yw=cl();function ey(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var bi;(function(n){let e;(function(t){function r(p,m){return{version:p.version,uri:m.asUri(p.uri)}}t.asVersionedNotebookDocumentIdentifier=r;function i(p,m,b){let C=Xn.NotebookDocument.create(b.asUri(p.uri),p.notebookType,p.version,o(m,b));return Object.keys(p.metadata).length>0&&(C.metadata=s(p.metadata)),C}t.asNotebookDocument=i;function o(p,m){return p.map(b=>a(b,m))}t.asNotebookCells=o;function s(p){return l(new Set,p)}t.asMetadata=s;function a(p,m){let b=Xn.NotebookCell.create(u(p.kind),m.asUri(p.document.uri));return Object.keys(p.metadata).length>0&&(b.metadata=s(p.metadata)),p.executionSummary!==void 0&&Ym.number(p.executionSummary.executionOrder)&&Ym.boolean(p.executionSummary.success)&&(b.executionSummary={executionOrder:p.executionSummary.executionOrder,success:p.executionSummary.success}),b}t.asNotebookCell=a;function u(p){switch(p){case ke.NotebookCellKind.Markup:return Xn.NotebookCellKind.Markup;case ke.NotebookCellKind.Code:return Xn.NotebookCellKind.Code}}function l(p,m){if(p.has(m))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(m)){let b=[];for(let C of m)if(C!==null&&typeof C=="object"||Array.isArray(C))b.push(l(p,C));else{if(C instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");b.push(C)}return b}else{let b=Object.keys(m),C=Object.create(null);for(let j of b){let U=m[j];if(U!==null&&typeof U=="object"||Array.isArray(U))C[j]=l(p,U);else{if(U instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");C[j]=U}}return C}}function f(p,m){let b=m.asChangeTextDocumentParams(p,p.document.uri,p.document.version);return{document:b.textDocument,changes:b.contentChanges}}t.asTextContentChange=f;function h(p,m){let b=Object.create(null);if(p.metadata&&(b.metadata=n.c2p.asMetadata(p.metadata)),p.cells!==void 0){let C=Object.create(null),j=p.cells;j.structure&&(C.structure={array:{start:j.structure.array.start,deleteCount:j.structure.array.deleteCount,cells:j.structure.array.cells!==void 0?j.structure.array.cells.map(U=>n.c2p.asNotebookCell(U,m)):void 0},didOpen:j.structure.didOpen!==void 0?j.structure.didOpen.map(U=>m.asOpenTextDocumentParams(U.document).textDocument):void 0,didClose:j.structure.didClose!==void 0?j.structure.didClose.map(U=>m.asCloseTextDocumentParams(U.document).textDocument):void 0}),j.data!==void 0&&(C.data=j.data.map(U=>n.c2p.asNotebookCell(U,m))),j.textContent!==void 0&&(C.textContent=j.textContent.map(U=>n.c2p.asTextContentChange(U,m))),Object.keys(C).length>0&&(b.cells=C)}return b}t.asNotebookDocumentChangeEvent=h})(e=n.c2p||(n.c2p={}))})(bi||(bi={}));var Ul;(function(n){function e(a,u,l){let f=a.length,h=u.length,p=0;for(;p<h&&p<f&&t(a[p],u[p],l);)p++;if(p<h&&p<f){let m=f-1,b=h-1;for(;m>=0&&b>=0&&t(a[m],u[b],l);)m--,b--;let C=m+1-p,j=p===b+1?void 0:u.slice(p,b+1);return j!==void 0?{start:p,deleteCount:C,cells:j}:{start:p,deleteCount:C}}else return p<h?{start:p,deleteCount:0,cells:u.slice(p)}:p<f?{start:p,deleteCount:f-p}:void 0}n.computeDiff=e;function t(a,u,l=!0){return a.kind!==u.kind||a.document.uri.toString()!==u.document.uri.toString()||a.document.languageId!==u.document.languageId||!r(a.executionSummary,u.executionSummary)?!1:!l||l&&o(a.metadata,u.metadata)}function r(a,u){return a===u?!0:a===void 0||u===void 0?!1:a.executionOrder===u.executionOrder&&a.success===u.success&&i(a.timing,u.timing)}function i(a,u){return a===u?!0:a===void 0||u===void 0?!1:a.startTime===u.startTime&&a.endTime===u.endTime}function o(a,u){if(a===u)return!0;if(a==null||u===null||u===void 0||typeof a!=typeof u||typeof a!="object")return!1;let l=Array.isArray(a),f=Array.isArray(u);if(l!==f)return!1;if(l&&f){if(a.length!==u.length)return!1;for(let h=0;h<a.length;h++)if(!o(a[h],u[h]))return!1}if(s(a)&&s(u)){let h=Object.keys(a),p=Object.keys(u);if(h.length!==p.length||(h.sort(),p.sort(),!o(h,p)))return!1;for(let m=0;m<h.length;m++){let b=h[m];if(!o(a[b],u[b]))return!1}return!0}return!1}function s(a){return a!==null&&typeof a=="object"}n.isObjectLiteral=s})(Ul||(Ul={}));var xs;(function(n){function e(t,r){if(typeof t=="string")return t==="*"||r.notebookType===t;if(t.notebookType!==void 0&&t.notebookType!=="*"&&r.notebookType!==t.notebookType)return!1;let i=r.uri;return!(t.scheme!==void 0&&t.scheme!=="*"&&i.scheme!==t.scheme||t.pattern!==void 0&&!(0,Yw.matchGlobPattern)(t.pattern,i))}n.matchNotebook=e})(xs||(xs={}));var Ms;(function(n){function e(r){let i=r.notebookSelector,o=[];for(let s of i){let a=(typeof s.notebook=="string"?s.notebook:s.notebook?.notebookType)??"*",u=typeof s.notebook=="string"?void 0:s.notebook?.scheme,l=typeof s.notebook=="string"?void 0:s.notebook?.pattern;if(s.cells!==void 0)for(let f of s.cells)o.push(t(a,u,l,f.language));else o.push(t(a,u,l,void 0))}return o}n.asDocumentSelector=e;function t(r,i,o,s){return i===void 0&&o===void 0?{notebook:r,language:s}:{notebook:{notebookType:r,scheme:i,pattern:o},language:s}}})(Ms||(Ms={}));var Es;(function(n){function e(t){return{cells:t,uris:new Set(t.map(r=>r.document.uri.toString()))}}n.create=e})(Es||(Es={}));var Ci=class{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,t,r,i,o,s){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(Ms.asDocumentSelector(t)),this.onChangeNotificationSent=r,this.onOpenNotificationSent=i,this.onCloseNotificationSent=o,this.onSaveNotificationSent=s,ke.workspace.onDidOpenNotebookDocument(a=>{this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a)},void 0,this.disposables);for(let a of ke.workspace.notebookDocuments)this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a);ke.workspace.onDidChangeNotebookDocument(a=>this.didChangeNotebookDocument(a),void 0,this.disposables),this.options.save===!0&&ke.workspace.onDidSaveNotebookDocument(a=>this.didSave(a),void 0,this.disposables),ke.workspace.onDidCloseNotebookDocument(a=>{this.didClose(a),this.notebookDidOpen.delete(a.uri.toString())},void 0,this.disposables)}getState(){for(let e of ke.workspace.notebookDocuments)if(this.getMatchingCellsConsideringSyncInfo(e)!==void 0)return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){if(ke.languages.match(this.selector,e)>0)return!0;let t=e.uri.toString();for(let r of this.notebookSyncInfo.values())if(r.uris.has(t))return!0;return!1}didOpenNotebookCellTextDocument(e,t){if(ke.languages.match(this.selector,t.document)===0||!this.notebookDidOpen.has(e.uri.toString()))return;let r=this.getSyncInfo(e),i=this.cellMatches(e,t);if(r!==void 0){let o=r.uris.has(t.document.uri.toString());if(i&&o||!i&&!o)return;if(i){let s=this.mergeCells(e,r,[t]);if(s!==void 0){let a=this.asNotebookDocumentChangeEvent(e,void 0,r,s);a!==void 0&&this.doSendChange(a,s).catch(()=>{})}}}else i&&this.doSendOpen(e,[t]).catch(()=>{})}didChangeNotebookCellTextDocument(e,t,r){if(ke.languages.match(this.selector,r.document)===0)return;let i=this.getSyncInfo(e);i===void 0||!i.uris.has(t.document.uri.toString())||this.doSendChange({notebook:e,cells:{textContent:[r]}},i.cells).catch(()=>{})}didCloseNotebookCellTextDocument(e,t){let r=this.getSyncInfo(e);if(r===void 0)return;let i=t.document.uri,o=r.cells.findIndex(s=>s.document.uri.toString()===i.toString());if(o!==-1)if(o===0&&r.cells.length===1)this.doSendClose(e,r.cells).catch(()=>{});else{let s=r.cells.slice(),a=s.splice(o,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:o,deleteCount:1},didClose:a}}},s).catch(()=>{})}}dispose(){for(let e of this.disposables)e.dispose()}didOpen(e,t,r=this.getSyncInfo(e)){if(r!==void 0)if(t===void 0&&(t=r.cells.slice()),t!==void 0){let i=this.asNotebookDocumentChangeEvent(e,void 0,r,t);i!==void 0&&this.doSendChange(i,t).catch(()=>{})}else this.doSendClose(e,[]).catch(()=>{});else{if(t=this.getMatchingCells(e),t===void 0)return;this.doSendOpen(e,t).catch(()=>{})}}didChangeNotebookDocument(e){let t=e.notebook,r=this.getSyncInfo(t);if(r===void 0){if(e.contentChanges.length===0)return;let i=this.getMatchingCells(t);if(i===void 0)return;this.didOpen(t,i,r)}else{let i=this.getMatchingCellsFromEvent(t,r,e);if(i===void 0){this.didClose(t,r);return}let o=this.asNotebookDocumentChangeEvent(e.notebook,e,r,i);o!==void 0&&this.doSendChange(o,i).catch(()=>{})}}didSave(e){this.getSyncInfo(e)!==void 0&&this.doSendSave(e).catch(()=>{})}didClose(e,t=this.getSyncInfo(e)){if(t===void 0)return;let r=e.getCells().filter(i=>t.uris.has(i.document.uri.toString()));this.doSendClose(e,r).catch(()=>{})}async sendDidOpenNotebookDocument(e){if(this.getSyncInfo(e)!==void 0)throw new Error(`Notebook document ${e.uri.toString()} is already open`);let r=this.getMatchingCells(e);if(r!==void 0)return this.doSendOpen(e,r)}async doSendOpen(e,t){let r=async(o,s)=>{let a=s.map(u=>this.client.code2ProtocolConverter.asTextDocumentItem(u.document));try{await this.client.sendNotification(Xn.DidOpenNotebookDocumentNotification.type,{notebookDocument:bi.c2p.asNotebookDocument(o,s,this.client.code2ProtocolConverter),cellTextDocuments:a}),this.onOpenNotificationSent.fire(o)}catch(u){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",u),u}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),Es.create(t)),i?.didOpen!==void 0?i.didOpen(e,t,r):r(e,t)}async sendDidChangeNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e.notebook);if(t===void 0)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,t)}async doSendChange(e,t){let r=async o=>{try{await this.client.sendNotification(Xn.DidChangeNotebookDocumentNotification.type,{notebookDocument:bi.c2p.asVersionedNotebookDocumentIdentifier(o.notebook,this.client.code2ProtocolConverter),change:bi.c2p.asNotebookDocumentChangeEvent(o,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(o)}catch(s){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",s),s}},i=this.client.middleware?.notebooks;return e.cells?.structure!==void 0&&this.notebookSyncInfo.set(e.notebook.uri.toString(),Es.create(t)),i?.didChange!==void 0?i?.didChange(e,r):r(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){let t=async i=>{try{await this.client.sendNotification(Xn.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(i.uri)}}),this.onSaveNotificationSent.fire(i)}catch(o){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",o),o}},r=this.client.middleware?.notebooks;return r?.didSave!==void 0?r.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){let t=this.getMatchingCellsFromSyncInfo(e);if(t===void 0)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,t)}async doSendClose(e,t){let r=async(o,s)=>{try{await this.client.sendNotification(Xn.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(o.uri)},cellTextDocuments:s.map(a=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(a.document))}),this.onCloseNotificationSent.fire(o)}catch(a){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",a),a}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),i?.didClose!==void 0?i.didClose(e,t,r):r(e,t)}getSynchronizedCells(e){return this.getSyncInfo(e)?.cells}asNotebookDocumentChangeEvent(e,t,r,i){if(t!==void 0&&t.notebook!==e)throw new Error("Notebook must be identical");let o={notebook:e};t?.metadata!==void 0&&(o.metadata=bi.c2p.asMetadata(t.metadata));let s;if(t?.cellChanges!==void 0&&t.cellChanges.length>0){let a=[];s=new Set(i.map(u=>u.document.uri.toString()));for(let u of t.cellChanges)s.has(u.cell.document.uri.toString())&&(u.executionSummary!==void 0||u.metadata!==void 0)&&a.push(u.cell);a.length>0&&(o.cells=o.cells??{},o.cells.data=a)}if((t?.contentChanges!==void 0&&t.contentChanges.length>0||t===void 0)&&r!==void 0&&i!==void 0){let a=r.cells,u=i,l=Ul.computeDiff(a,u,!1),f,h;if(l!==void 0){f=l.cells===void 0?new Map:new Map(l.cells.map(b=>[b.document.uri.toString(),b])),h=l.deleteCount===0?new Map:new Map(a.slice(l.start,l.start+l.deleteCount).map(b=>[b.document.uri.toString(),b]));for(let b of Array.from(h.keys()))f.has(b)&&(h.delete(b),f.delete(b));o.cells=o.cells??{};let p=[],m=[];if(f.size>0||h.size>0){for(let b of f.values())p.push(b);for(let b of h.values())m.push(b)}o.cells.structure={array:l,didOpen:p,didClose:m}}}return Object.keys(o).length>1?o:void 0}getMatchingCells(e,t=e.getCells()){if(this.options.notebookSelector!==void 0){for(let r of this.options.notebookSelector)if(r.notebook===void 0||xs.matchNotebook(r.notebook,e)){let i=this.filterCells(e,t,r.cells);return i.length===0?void 0:i}}}getMatchingCellsFromEvent(e,t,r){if(this.options.notebookSelector===void 0)return;let i;for(let u of this.options.notebookSelector)if(u.notebook===void 0||xs.matchNotebook(u.notebook,e)){i=u;break}if(i===void 0)return;if((r.cellChanges===void 0||r.cellChanges.length===0)&&(r.contentChanges===void 0||r.contentChanges.length===0))return t.cells;let o;if(r.cellChanges!==void 0&&r.cellChanges.length>0){let u=r.cellChanges.map(f=>f.cell),l=this.filterCells(e,u,i.cells);if(l.length!==u.length){o=new Set(t.uris);for(let f of u)o.delete(f.document.uri.toString());for(let f of l)o.add(f.document.uri.toString())}}if(r.contentChanges!==void 0&&r.contentChanges.length>0){o===void 0&&(o=new Set(t.uris));for(let u of r.contentChanges){for(let f of u.removedCells)o.delete(f.document.uri.toString());let l=this.filterCells(e,new Array(...u.addedCells),i.cells);for(let f of l)o.add(f.document.uri.toString())}}if(o===void 0)return t.cells;let s=[],a=e.getCells();for(let u of a)o.has(u.document.uri.toString())&&s.push(u);return s}getMatchingCellsFromSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:void 0}getMatchingCellsConsideringSyncInfo(e){let t=this.getSyncInfo(e);return t!==void 0?t.cells:this.getMatchingCells(e)}mergeCells(e,t,r){let i=[],o=new Set(t.uris);for(let s of r)o.add(s.document.uri.toString());for(let s of e.getCells())o.has(s.document.uri.toString())&&i.push(s);return i}cellMatches(e,t){let r=this.getMatchingCells(e,[t]);return r!==void 0&&r[0]===t}filterCells(e,t,r){let i=r!==void 0?t.filter(o=>{let s=o.document.languageId;return r.some((a=>a.language==="*"||s===a.language))}):t;return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells=="function"?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}},Wl=class n{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=Xn.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new ke.EventEmitter,this._onOpenNotificationSent=new ke.EventEmitter,this._onCloseNotificationSent=new ke.EventEmitter,this._onSaveNotificationSent=new ke.EventEmitter,ke.workspace.onDidOpenTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let o of this.registrations.values())o instanceof Ci&&o.didOpenNotebookCellTextDocument(r,i)}),ke.workspace.onDidChangeTextDocument(t=>{if(t.contentChanges.length===0)return;let r=t.document;if(r.uri.scheme!==n.CellScheme)return;let[i,o]=this.findNotebookDocumentAndCell(r);if(!(i===void 0||o===void 0))for(let s of this.registrations.values())s instanceof Ci&&s.didChangeNotebookCellTextDocument(i,o,t)}),ke.workspace.onDidCloseTextDocument(t=>{if(t.uri.scheme!==n.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(t);if(!(r===void 0||i===void 0))for(let o of this.registrations.values())o instanceof Ci&&o.didCloseNotebookCellTextDocument(r,i)})}getState(){if(this.registrations.size===0)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(let e of this.registrations.values()){let t=e.getState();if(t.kind==="document"&&t.registrations===!0&&t.matches===!0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){let t=ey(ey(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){let t=e.notebookDocumentSync;t!==void 0&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(Ms.asDocumentSelector(t)))}initialize(e){let t=e.notebookDocumentSync;if(t===void 0)return;let r=t.id??Zw.generateUuid();this.register({id:r,registerOptions:t})}register(e){let t=new Ci(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,t)}unregister(e){let t=this.registrations.get(e);t!==void 0&&(this.registrations.delete(e),t.dispose())}clear(){for(let e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new ke.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new ke.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new ke.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new ke.EventEmitter}handles(e){if(e.uri.scheme!==n.CellScheme)return!1;if(this.dedicatedChannel!==void 0&&ke.languages.match(this.dedicatedChannel,e)>0)return!0;for(let t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(let t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){let t=e.uri.toString();for(let r of ke.workspace.notebookDocuments)for(let i of r.getCells())if(i.document.uri.toString()===t)return[r,i];return[void 0,void 0]}};dn.NotebookDocumentSyncFeature=Wl});var iy=F(It=>{"use strict";y();var eD=It&&It.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),tD=It&&It.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ry=It&&It.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&eD(t,e,r[i]);return tD(t,e),t}})();Object.defineProperty(It,"__esModule",{value:!0});It.SyncConfigurationFeature=It.ConfigurationFeature=void 0;It.toJSONObject=kr;var wi=require("vscode"),ao=oe(),nD=ry(Qt()),rD=ry(Fe()),ny=ge(),$l=class{_client;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(ao.ConfigurationRequest.type,(t,r)=>{let i=s=>{let a=[];for(let u of s.items){let l=u.scopeUri!==void 0&&u.scopeUri!==null?this._client.protocol2CodeConverter.asUri(u.scopeUri):void 0;a.push(this.getConfiguration(l,u.section!==null?u.section:void 0))}return a},o=e.middleware.workspace;return o&&o.configuration?o.configuration(t,r,i):i(t,r)})}getConfiguration(e,t){let r=null;if(t){let i=t.lastIndexOf(".");if(i===-1)r=kr(wi.workspace.getConfiguration(void 0,e).get(t));else{let o=wi.workspace.getConfiguration(t.substr(0,i),e);o&&(r=kr(o.get(t.substr(i+1))))}}else{let i=wi.workspace.getConfiguration(void 0,e);r={};for(let o of Object.keys(i))i.has(o)&&(r[o]=kr(i.get(o)))}return r===void 0&&(r=null),r}clear(){}};It.ConfigurationFeature=$l;function kr(n){if(n){if(Array.isArray(n))return n.map(kr);if(typeof n=="object"){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=kr(n[t]));return e}}return n}var zl=class{_client;isCleared;_listeners;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 ao.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,ny.ensure)((0,ny.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;e!==void 0&&this.register({id:rD.generateUuid(),registerOptions:{section:e}})}register(e){let t=wi.workspace.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,t),e.registerOptions.section!==void 0&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let r;if(nD.string(e)?r=[e]:r=e,r!==void 0&&t!==void 0&&!r.some(a=>t.affectsConfiguration(a)))return;let i=async s=>s===void 0?this._client.sendNotification(ao.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(ao.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(s)}),o=this._client.middleware.workspace?.didChangeConfiguration;(o?o(r,i):i(r)).catch(s=>{this._client.error(`Sending notification ${ao.DidChangeConfigurationNotification.type.method} failed`,s)})}extractSettingsInformation(e){function t(o,s){let a=o;for(let u=0;u<s.length-1;u++){let l=a[s[u]];l||(l=Object.create(null),a[s[u]]=l),a=l}return a}let r=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){let s=e[o],a=s.indexOf("."),u=null;if(a>=0?u=wi.workspace.getConfiguration(s.substr(0,a),r).get(s.substr(a+1)):u=wi.workspace.getConfiguration(void 0,r).get(s),u){let l=e[o].split(".");t(i,l)[l[l.length-1]]=kr(u)}}return i}};It.SyncConfigurationFeature=zl});var oy=F(Xe=>{"use strict";y();var iD=Xe&&Xe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),oD=Xe&&Xe.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),sD=Xe&&Xe.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&iD(t,e,r[i]);return oD(t,e),t}})();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.DidSaveTextDocumentFeature=Xe.WillSaveWaitUntilFeature=Xe.WillSaveFeature=Xe.DidChangeTextDocumentFeature=Xe.DidCloseTextDocumentFeature=Xe.DidOpenTextDocumentFeature=void 0;var Pt=require("vscode"),qe=oe(),ze=ge(),Di=sD(Fe()),Kl=class extends ze.TextDocumentEventFeature{_syncedDocuments;_pendingOpenNotifications;_delayOpen;_pendingOpenListeners;constructor(e,t){super(e,Pt.workspace.onDidOpenTextDocument,qe.DidOpenTextDocumentNotification.type,()=>e.middleware.didOpen,r=>e.code2ProtocolConverter.asOpenTextDocumentParams(r),r=>r,ze.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){if(this._delayOpen){if(!this.matches(e))return;if(this._client.visibleDocuments.isVisible(e))return super.callback(e);this._pendingOpenNotifications.set(e.uri.toString(),e)}else return super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,ze.ensure)((0,ze.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Di.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return qe.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(Pt.workspace.textDocuments.forEach(r=>{let i=r.uri.toString();if(!this._syncedDocuments.has(i)&&Pt.languages.match(t,r)>0&&!this._client.hasDedicatedTextSynchronizationFeature(r))if(this._client.visibleDocuments.isVisible(r)){let s=this._client.middleware,a=u=>this._client.sendNotification(this._type,this._createParams(u));(s.didOpen?s.didOpen(r,a):a(r)).catch(u=>{this._client.error(`Sending document notification ${this._type.method} failed`,u)}),this._syncedDocuments.set(i,r)}else this._pendingOpenNotifications.set(i,r)}),this._delayOpen&&this._pendingOpenListeners===void 0){this._pendingOpenListeners=[];let r=this._client.visibleDocuments;this._pendingOpenListeners.push(r.onClose(i=>{for(let o of i)this._pendingOpenNotifications.delete(o.toString())})),this._pendingOpenListeners.push(r.onOpen(i=>{for(let o of i){let s=this._pendingOpenNotifications.get(o.toString());s!==void 0&&(super.callback(s).catch((a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})),this._pendingOpenNotifications.delete(o.toString()))}})),this._pendingOpenListeners.push(Pt.workspace.onDidCloseTextDocument(i=>{this._pendingOpenNotifications.delete(i.uri.toString())}))}}async sendPendingOpenNotifications(e){let t=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();let r=!1;for(let i of t){if(e!==void 0&&i.uri.toString()===e){r=!0;continue}await super.callback(i)}return r}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,r)}clear(){if(this._pendingOpenNotifications.clear(),this._pendingOpenListeners!==void 0){for(let e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}};Xe.DidOpenTextDocumentFeature=Kl;var Bl=class extends ze.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,t,r){super(e,Pt.workspace.onDidCloseTextDocument,qe.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,i=>e.code2ProtocolConverter.asCloseTextDocumentParams(i),i=>i,ze.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=r}get registrationType(){return qe.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,ze.ensure)((0,ze.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.openClose&&this.register({id:Di.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,r){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,r)}unregister(e){let t=this._selectors.get(e);if(t===void 0)return;super.unregister(e);let r=this._selectors.values();this._syncedDocuments.forEach(i=>{if(Pt.languages.match(t,i)>0&&!this._selectorFilter(r,i)&&!this._client.hasDedicatedTextSynchronizationFeature(i)){let o=this._client.middleware,s=a=>this._client.sendNotification(this._type,this._createParams(a));this._syncedDocuments.delete(i.uri.toString()),(o.didClose?o.didClose(i,s):s(i)).catch(a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})}})}};Xe.DidCloseTextDocumentFeature=Bl;var Vl=class extends ze.DynamicDocumentFeature{_listener;_changeData;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new Pt.EventEmitter,this._onPendingChangeAdded=new Pt.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=qe.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return qe.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,ze.ensure)((0,ze.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.change!==void 0&&r.change!==qe.TextDocumentSyncKind.None&&this.register({id:Di.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:r.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Pt.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(let e of this._changeData.values())yield e.documentSelector}async callback(e){if(e.contentChanges.length===0)return;let t=e.document.uri,r=e.document.version,i=[];for(let o of this._changeData.values())if(Pt.languages.match(o.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let s=this._client.middleware;if(o.syncKind===qe.TextDocumentSyncKind.Incremental){let a=async u=>{let l=this._client.code2ProtocolConverter.asChangeTextDocumentParams(u,t,r);await this._client.sendNotification(qe.DidChangeTextDocumentNotification.type,l),this.notificationSent(u.document,qe.DidChangeTextDocumentNotification.type,l)};i.push(s.didChange?s.didChange(e,u=>a(u)):a(e))}else if(o.syncKind===qe.TextDocumentSyncKind.Full){let a=async u=>{let l=u.document.uri.toString();this._pendingTextDocumentChanges.set(l,u.document),this._onPendingChangeAdded.fire()};i.push(s.didChange?s.didChange(e,u=>a(u)):a(e))}}return Promise.all(i).then(void 0,o=>{throw this._client.error(`Sending document notification ${qe.DidChangeTextDocumentNotification.type.method} failed`,o),o})}notificationSent(e,t,r){this._onNotificationSent.fire({textDocument:e,type:t,params:r})}unregister(e){if(this._changeData.delete(e),this._changeData.size===0)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=qe.TextDocumentSyncKind.None;else{this._syncKind=qe.TextDocumentSyncKind.None;for(let t of this._changeData.values())if(this.updateSyncKind(t.syncKind),this._syncKind===qe.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=qe.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(this._pendingTextDocumentChanges.size===0)return[];let t;if(e.size===0)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(let r of this._pendingTextDocumentChanges)e.has(r[0])||(t.push(r[1]),this._pendingTextDocumentChanges.delete(r[0]))}return t}getProvider(e){for(let t of this._changeData.values())if(Pt.languages.match(t.documentSelector,e)>0)return{send:r=>this.callback(r)}}updateSyncKind(e){if(this._syncKind!==qe.TextDocumentSyncKind.Full)switch(e){case qe.TextDocumentSyncKind.Full:this._syncKind=e;break;case qe.TextDocumentSyncKind.Incremental:this._syncKind===qe.TextDocumentSyncKind.None&&(this._syncKind=qe.TextDocumentSyncKind.Incremental);break}}};Xe.DidChangeTextDocumentFeature=Vl;var Gl=class extends ze.TextDocumentEventFeature{constructor(e){super(e,Pt.workspace.onWillSaveTextDocument,qe.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),t=>t.document,(t,r)=>ze.TextDocumentEventFeature.textDocumentFilter(t,r.document))}get registrationType(){return qe.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=(0,ze.ensure)((0,ze.ensure)(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSave&&this.register({id:Di.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}};Xe.WillSaveFeature=Gl;var Jl=class extends ze.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return qe.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=(0,ze.ensure)((0,ze.ensure)(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;t&&r&&r.willSaveWaitUntil&&this.register({id:Di.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Pt.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(ze.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,r=i=>this._client.sendRequest(qe.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(i)).then(async o=>{let s=await this._client.protocol2CodeConverter.asTextEdits(o);return s===void 0?[]:s});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,r):r(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}};Xe.WillSaveWaitUntilFeature=Jl;var Ql=class extends ze.TextDocumentEventFeature{_includeText;constructor(e){super(e,Pt.workspace.onDidSaveTextDocument,qe.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),t=>t,ze.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return qe.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,ze.ensure)((0,ze.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let r=e.resolvedTextDocumentSync;if(t&&r&&r.save){let i=typeof r.save=="boolean"?{includeText:!1}:{includeText:!!r.save.includeText};this.register({id:Di.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},i)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}};Xe.DidSaveTextDocumentFeature=Ql});var sy=F(fn=>{"use strict";y();var aD=fn&&fn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),cD=fn&&fn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),uD=fn&&fn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&aD(t,e,r[i]);return cD(t,e),t}})();Object.defineProperty(fn,"__esModule",{value:!0});fn.CompletionItemFeature=void 0;var lD=require("vscode"),pe=oe(),Xl=ge(),dD=uD(Fe()),fD=[pe.CompletionItemKind.Text,pe.CompletionItemKind.Method,pe.CompletionItemKind.Function,pe.CompletionItemKind.Constructor,pe.CompletionItemKind.Field,pe.CompletionItemKind.Variable,pe.CompletionItemKind.Class,pe.CompletionItemKind.Interface,pe.CompletionItemKind.Module,pe.CompletionItemKind.Property,pe.CompletionItemKind.Unit,pe.CompletionItemKind.Value,pe.CompletionItemKind.Enum,pe.CompletionItemKind.Keyword,pe.CompletionItemKind.Snippet,pe.CompletionItemKind.Color,pe.CompletionItemKind.File,pe.CompletionItemKind.Reference,pe.CompletionItemKind.Folder,pe.CompletionItemKind.EnumMember,pe.CompletionItemKind.Constant,pe.CompletionItemKind.Struct,pe.CompletionItemKind.Event,pe.CompletionItemKind.Operator,pe.CompletionItemKind.TypeParameter],Zl=class extends Xl.TextDocumentLanguageFeature{labelDetailsSupport;constructor(e){super(e,pe.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,Xl.ensure)((0,Xl.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[pe.MarkupKind.Markdown,pe.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[pe.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[pe.InsertTextMode.asIs,pe.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=pe.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:fD},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"],applyKindSupport:!0}}initialize(e,t){let r=this.getRegistrationOptions(t,e.completionProvider);r&&this.register({id:dD.generateUuid(),registerOptions:r})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);let r=e.triggerCharacters??[],i=e.allCommitCharacters,o=e.documentSelector,s={provideCompletionItems:(a,u,l,f)=>{let h=this._client,p=this._client.middleware,m=(b,C,j,U)=>h.sendRequest(pe.CompletionRequest.type,h.code2ProtocolConverter.asCompletionParams(b,C,j),U).then(E=>U.isCancellationRequested?null:h.protocol2CodeConverter.asCompletionResult(E,i,U),E=>h.handleFailedRequest(pe.CompletionRequest.type,U,E,null));return p.provideCompletionItem?p.provideCompletionItem(a,u,f,l,m):m(a,u,f,l)},resolveCompletionItem:e.resolveProvider?(a,u)=>{let l=this._client,f=this._client.middleware,h=(p,m)=>l.sendRequest(pe.CompletionResolveRequest.type,l.code2ProtocolConverter.asCompletionItem(p,!!this.labelDetailsSupport.get(t)),m).then(b=>m.isCancellationRequested?null:l.protocol2CodeConverter.asCompletionItem(b),b=>l.handleFailedRequest(pe.CompletionResolveRequest.type,m,b,p));return f.resolveCompletionItem?f.resolveCompletionItem(a,u,h):h(a,u)}:void 0};return[lD.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(o),s,...r),s]}};fn.CompletionItemFeature=Zl});var ay=F(hn=>{"use strict";y();var hD=hn&&hn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),pD=hn&&hn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),gD=hn&&hn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&hD(t,e,r[i]);return pD(t,e),t}})();Object.defineProperty(hn,"__esModule",{value:!0});hn.HoverFeature=void 0;var mD=require("vscode"),co=oe(),Yl=ge(),yD=gD(Fe()),ed=class extends Yl.TextDocumentLanguageFeature{constructor(e){super(e,co.HoverRequest.type)}fillClientCapabilities(e){let t=(0,Yl.ensure)((0,Yl.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[co.MarkupKind.Markdown,co.MarkupKind.PlainText]}initialize(e,t){let r=this.getRegistrationOptions(t,e.hoverProvider);r&&this.register({id:yD.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideHover:(i,o,s)=>{let a=this._client,u=(f,h,p)=>a.sendRequest(co.HoverRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,h),p).then(m=>p.isCancellationRequested?null:a.protocol2CodeConverter.asHover(m),m=>a.handleFailedRequest(co.HoverRequest.type,p,m,null)),l=a.middleware;return l.provideHover?l.provideHover(i,o,s,u):u(i,o,s)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return mD.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};hn.HoverFeature=ed});var cy=F(pn=>{"use strict";y();var vD=pn&&pn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),_D=pn&&pn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),bD=pn&&pn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&vD(t,e,r[i]);return _D(t,e),t}})();Object.defineProperty(pn,"__esModule",{value:!0});pn.DefinitionFeature=void 0;var CD=require("vscode"),td=oe(),nd=ge(),wD=bD(Fe()),rd=class extends nd.TextDocumentLanguageFeature{constructor(e){super(e,td.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,nd.ensure)((0,nd.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.definitionProvider);r&&this.register({id:wD.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDefinition:(i,o,s)=>{let a=this._client,u=(f,h,p)=>a.sendRequest(td.DefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,h),p).then(m=>p.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(m,p),m=>a.handleFailedRequest(td.DefinitionRequest.type,p,m,null)),l=a.middleware;return l.provideDefinition?l.provideDefinition(i,o,s,u):u(i,o,s)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return CD.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};pn.DefinitionFeature=rd});var ly=F(gn=>{"use strict";y();var DD=gn&&gn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),SD=gn&&gn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),PD=gn&&gn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&DD(t,e,r[i]);return SD(t,e),t}})();Object.defineProperty(gn,"__esModule",{value:!0});gn.SignatureHelpFeature=void 0;var uy=require("vscode"),uo=oe(),id=ge(),RD=PD(Fe()),od=class extends id.TextDocumentLanguageFeature{constructor(e){super(e,uo.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,id.ensure)((0,id.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[uo.MarkupKind.Markdown,uo.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.signatureInformation.noActiveParameterSupport=!0,t.contextSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.signatureHelpProvider);r&&this.register({id:RD.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t={provideSignatureHelp:(r,i,o,s)=>{let a=this._client,u=(f,h,p,m)=>a.sendRequest(uo.SignatureHelpRequest.type,a.code2ProtocolConverter.asSignatureHelpParams(f,h,p),m).then(b=>m.isCancellationRequested?null:a.protocol2CodeConverter.asSignatureHelp(b,m),b=>a.handleFailedRequest(uo.SignatureHelpRequest.type,m,b,null)),l=a.middleware;return l.provideSignatureHelp?l.provideSignatureHelp(r,i,s,o,u):u(r,i,s,o)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){let r=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(e.retriggerCharacters===void 0){let i=e.triggerCharacters||[];return uy.languages.registerSignatureHelpProvider(r,t,...i)}else{let i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return uy.languages.registerSignatureHelpProvider(r,t,i)}}};gn.SignatureHelpFeature=od});var dy=F(mn=>{"use strict";y();var TD=mn&&mn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OD=mn&&mn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qD=mn&&mn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&TD(t,e,r[i]);return OD(t,e),t}})();Object.defineProperty(mn,"__esModule",{value:!0});mn.DocumentHighlightFeature=void 0;var xD=require("vscode"),sd=oe(),ad=ge(),MD=qD(Fe()),cd=class extends ad.TextDocumentLanguageFeature{constructor(e){super(e,sd.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,ad.ensure)((0,ad.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentHighlightProvider);r&&this.register({id:MD.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentHighlights:(i,o,s)=>{let a=this._client,u=(f,h,p)=>a.sendRequest(sd.DocumentHighlightRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,h),p).then(m=>p.isCancellationRequested?null:a.protocol2CodeConverter.asDocumentHighlights(m,p),m=>a.handleFailedRequest(sd.DocumentHighlightRequest.type,p,m,null)),l=a.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,o,s,u):u(i,o,s)}};return[xD.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};mn.DocumentHighlightFeature=cd});var dd=F(gt=>{"use strict";y();var ED=gt&>.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jD=gt&>.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),FD=gt&>.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&ED(t,e,r[i]);return jD(t,e),t}})();Object.defineProperty(gt,"__esModule",{value:!0});gt.DocumentSymbolFeature=gt.SupportedSymbolTags=gt.SupportedSymbolKinds=void 0;var ID=require("vscode"),we=oe(),ud=ge(),ND=FD(Fe());gt.SupportedSymbolKinds=[we.SymbolKind.File,we.SymbolKind.Module,we.SymbolKind.Namespace,we.SymbolKind.Package,we.SymbolKind.Class,we.SymbolKind.Method,we.SymbolKind.Property,we.SymbolKind.Field,we.SymbolKind.Constructor,we.SymbolKind.Enum,we.SymbolKind.Interface,we.SymbolKind.Function,we.SymbolKind.Variable,we.SymbolKind.Constant,we.SymbolKind.String,we.SymbolKind.Number,we.SymbolKind.Boolean,we.SymbolKind.Array,we.SymbolKind.Object,we.SymbolKind.Key,we.SymbolKind.Null,we.SymbolKind.EnumMember,we.SymbolKind.Struct,we.SymbolKind.Event,we.SymbolKind.Operator,we.SymbolKind.TypeParameter];gt.SupportedSymbolTags=[we.SymbolTag.Deprecated];var ld=class extends ud.TextDocumentLanguageFeature{constructor(e){super(e,we.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=(0,ud.ensure)((0,ud.ensure)(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:gt.SupportedSymbolKinds},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:gt.SupportedSymbolTags},t.labelSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentSymbolProvider);r&&this.register({id:ND.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentSymbols:(o,s)=>{let a=this._client,u=async(f,h)=>{try{let p=await a.sendRequest(we.DocumentSymbolRequest.type,a.code2ProtocolConverter.asDocumentSymbolParams(f),h);if(h.isCancellationRequested||p===void 0||p===null)return null;if(p.length===0)return[];{let m=p[0];return we.DocumentSymbol.is(m)?await a.protocol2CodeConverter.asDocumentSymbols(p,h):await a.protocol2CodeConverter.asSymbolInformations(p,h)}}catch(p){return a.handleFailedRequest(we.DocumentSymbolRequest.type,h,p,null)}},l=a.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(o,s,u):u(o,s)}},i=e.label!==void 0?{label:e.label}:void 0;return[ID.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,i),r]}};gt.DocumentSymbolFeature=ld});var hy=F(yn=>{"use strict";y();var kD=yn&&yn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),AD=yn&&yn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),LD=yn&&yn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&kD(t,e,r[i]);return AD(t,e),t}})();Object.defineProperty(yn,"__esModule",{value:!0});yn.WorkspaceSymbolFeature=void 0;var HD=require("vscode"),lo=oe(),fd=ge(),fy=dd(),UD=LD(Fe()),hd=class extends fd.WorkspaceFeature{constructor(e){super(e,lo.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,fd.ensure)((0,fd.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:fy.SupportedSymbolKinds},t.tagSupport={valueSet:fy.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:UD.generateUuid(),registerOptions:e.workspaceSymbolProvider===!0?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){let t={provideWorkspaceSymbols:(r,i)=>{let o=this._client,s=(u,l)=>o.sendRequest(lo.WorkspaceSymbolRequest.type,{query:u},l).then(f=>l.isCancellationRequested?null:o.protocol2CodeConverter.asSymbolInformations(f,l),f=>o.handleFailedRequest(lo.WorkspaceSymbolRequest.type,l,f,null)),a=o.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(r,i,s):s(r,i)},resolveWorkspaceSymbol:e.resolveProvider===!0?(r,i)=>{let o=this._client,s=(u,l)=>o.sendRequest(lo.WorkspaceSymbolResolveRequest.type,o.code2ProtocolConverter.asWorkspaceSymbol(u),l).then(f=>l.isCancellationRequested?null:o.protocol2CodeConverter.asSymbolInformation(f),f=>o.handleFailedRequest(lo.WorkspaceSymbolResolveRequest.type,l,f,null)),a=o.middleware;return a.resolveWorkspaceSymbol?a.resolveWorkspaceSymbol(r,i,s):s(r,i)}:void 0};return[HD.languages.registerWorkspaceSymbolProvider(t),t]}};yn.WorkspaceSymbolFeature=hd});var py=F(vn=>{"use strict";y();var WD=vn&&vn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),$D=vn&&vn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),zD=vn&&vn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&WD(t,e,r[i]);return $D(t,e),t}})();Object.defineProperty(vn,"__esModule",{value:!0});vn.ReferencesFeature=void 0;var KD=require("vscode"),pd=oe(),gd=ge(),BD=zD(Fe()),md=class extends gd.TextDocumentLanguageFeature{constructor(e){super(e,pd.ReferencesRequest.type)}fillClientCapabilities(e){(0,gd.ensure)((0,gd.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.referencesProvider);r&&this.register({id:BD.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideReferences:(i,o,s,a)=>{let u=this._client,l=(h,p,m,b)=>u.sendRequest(pd.ReferencesRequest.type,u.code2ProtocolConverter.asReferenceParams(h,p,m),b).then(C=>b.isCancellationRequested?null:u.protocol2CodeConverter.asReferences(C,b),C=>u.handleFailedRequest(pd.ReferencesRequest.type,b,C,null)),f=u.middleware;return f.provideReferences?f.provideReferences(i,o,s,a,l):l(i,o,s,a)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return KD.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};vn.ReferencesFeature=md});var gy=F(Fs=>{"use strict";y();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.TypeDefinitionFeature=void 0;var VD=require("vscode"),yd=oe(),fo=ge(),vd=class extends fo.TextDocumentLanguageFeature{constructor(e){super(e,yd.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,fo.ensure)((0,fo.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,fo.ensure)((0,fo.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeDefinitionProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideTypeDefinition:(i,o,s)=>{let a=this._client,u=(f,h,p)=>a.sendRequest(yd.TypeDefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,h),p).then(m=>p.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(m,p),m=>a.handleFailedRequest(yd.TypeDefinitionRequest.type,p,m,null)),l=a.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,o,s,u):u(i,o,s)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return VD.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Fs.TypeDefinitionFeature=vd});var my=F(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.ImplementationFeature=void 0;var GD=require("vscode"),_d=oe(),bd=ge(),Cd=class extends bd.TextDocumentLanguageFeature{constructor(e){super(e,_d.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,bd.ensure)((0,bd.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.implementationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideImplementation:(i,o,s)=>{let a=this._client,u=(f,h,p)=>a.sendRequest(_d.ImplementationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,h),p).then(m=>p.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(m,p),m=>a.handleFailedRequest(_d.ImplementationRequest.type,p,m,null)),l=a.middleware;return l.provideImplementation?l.provideImplementation(i,o,s,u):u(i,o,s)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return GD.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Is.ImplementationFeature=Cd});var yy=F(Ns=>{"use strict";y();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.ColorProviderFeature=void 0;var JD=require("vscode"),ho=oe(),wd=ge(),Dd=class extends wd.TextDocumentLanguageFeature{constructor(e){super(e,ho.DocumentColorRequest.type)}fillClientCapabilities(e){(0,wd.ensure)((0,wd.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.colorProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideColorPresentations:(i,o,s)=>{let a=this._client,u=(f,h,p)=>{let m={color:f,textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(h.document),range:a.code2ProtocolConverter.asRange(h.range)};return a.sendRequest(ho.ColorPresentationRequest.type,m,p).then(b=>p.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(b,p),b=>a.handleFailedRequest(ho.ColorPresentationRequest.type,p,b,null))},l=a.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,o,s,u):u(i,o,s)},provideDocumentColors:(i,o)=>{let s=this._client,a=(l,f)=>{let h={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(l)};return s.sendRequest(ho.DocumentColorRequest.type,h,f).then(p=>f.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(p,f),p=>s.handleFailedRequest(ho.DocumentColorRequest.type,f,p,null))},u=s.middleware;return u.provideDocumentColors?u.provideDocumentColors(i,o,a):a(i,o)}};return[JD.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Ns.ColorProviderFeature=Dd});var vy=F(_n=>{"use strict";y();var QD=_n&&_n.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),XD=_n&&_n.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ZD=_n&&_n.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&QD(t,e,r[i]);return XD(t,e),t}})();Object.defineProperty(_n,"__esModule",{value:!0});_n.CodeActionFeature=void 0;var YD=require("vscode"),mt=oe(),eS=ZD(Fe()),Sd=ge(),Pd=class extends Sd.TextDocumentLanguageFeature{constructor(e){super(e,mt.CodeActionRequest.type)}fillClientCapabilities(e){let t=(0,Sd.ensure)((0,Sd.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit","command"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[mt.CodeActionKind.Empty,mt.CodeActionKind.QuickFix,mt.CodeActionKind.Refactor,mt.CodeActionKind.RefactorExtract,mt.CodeActionKind.RefactorInline,mt.CodeActionKind.RefactorMove,mt.CodeActionKind.RefactorRewrite,mt.CodeActionKind.Source,mt.CodeActionKind.SourceOrganizeImports,mt.CodeActionKind.Notebook]}},t.honorsChangeAnnotations=!0,t.documentationSupport=!0,t.tagSupport={valueSet:[mt.CodeActionTag.LLMGenerated]}}initialize(e,t){let r=this.getRegistrationOptions(t,e.codeActionProvider);r&&this.register({id:eS.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideCodeActions:(i,o,s,a)=>{let u=this._client,l=async(h,p,m,b)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),range:u.code2ProtocolConverter.asRange(p),context:u.code2ProtocolConverter.asCodeActionContextSync(m)};return u.sendRequest(mt.CodeActionRequest.type,C,b).then(j=>b.isCancellationRequested||j===null||j===void 0?null:u.protocol2CodeConverter.asCodeActionResult(j,b),j=>u.handleFailedRequest(mt.CodeActionRequest.type,b,j,null))},f=u.middleware;return f.provideCodeActions?f.provideCodeActions(i,o,s,a,l):l(i,o,s,a)},resolveCodeAction:e.resolveProvider?(i,o)=>{let s=this._client,a=this._client.middleware,u=async(l,f)=>s.sendRequest(mt.CodeActionResolveRequest.type,s.code2ProtocolConverter.asCodeActionSync(l),f).then(h=>f.isCancellationRequested?l:s.protocol2CodeConverter.asCodeAction(h,f),h=>s.handleFailedRequest(mt.CodeActionResolveRequest.type,f,h,l));return a.resolveCodeAction?a.resolveCodeAction(i,o,u):u(i,o)}:void 0};return[YD.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,this.getMetadata(e)),r]}getMetadata(e){if(!(e.codeActionKinds===void 0&&e.documentation===void 0))return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}};_n.CodeActionFeature=Pd});var by=F(bn=>{"use strict";y();var tS=bn&&bn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),nS=bn&&bn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),rS=bn&&bn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&tS(t,e,r[i]);return nS(t,e),t}})();Object.defineProperty(bn,"__esModule",{value:!0});bn.CodeLensFeature=void 0;var _y=require("vscode"),Si=oe(),iS=rS(Fe()),po=ge(),Rd=class extends po.TextDocumentLanguageFeature{constructor(e){super(e,Si.CodeLensRequest.type)}fillClientCapabilities(e){let t=(0,po.ensure)((0,po.ensure)(e,"textDocument"),"codeLens");t.dynamicRegistration=!0,t.resolveSupport={properties:["command"]},(0,po.ensure)((0,po.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(Si.CodeLensRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeCodeLensEmitter.fire()});let i=this.getRegistrationOptions(t,e.codeLensProvider);i&&this.register({id:iS.generateUuid(),registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new _y.EventEmitter,i={onDidChangeCodeLenses:r.event,provideCodeLenses:(o,s)=>{let a=this._client,u=(f,h)=>a.sendRequest(Si.CodeLensRequest.type,a.code2ProtocolConverter.asCodeLensParams(f),h).then(p=>h.isCancellationRequested?null:a.protocol2CodeConverter.asCodeLenses(p,h),p=>a.handleFailedRequest(Si.CodeLensRequest.type,h,p,null)),l=a.middleware;return l.provideCodeLenses?l.provideCodeLenses(o,s,u):u(o,s)},resolveCodeLens:e.resolveProvider?(o,s)=>{let a=this._client,u=(f,h)=>a.sendRequest(Si.CodeLensResolveRequest.type,a.code2ProtocolConverter.asCodeLens(f),h).then(p=>h.isCancellationRequested?f:a.protocol2CodeConverter.asCodeLens(p),p=>a.handleFailedRequest(Si.CodeLensResolveRequest.type,h,p,f)),l=a.middleware;return l.resolveCodeLens?l.resolveCodeLens(o,s,u):u(o,s)}:void 0};return[_y.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:r}]}};bn.CodeLensFeature=Rd});var Cy=F(Rt=>{"use strict";y();var oS=Rt&&Rt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),sS=Rt&&Rt.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),aS=Rt&&Rt.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&oS(t,e,r[i]);return sS(t,e),t}})();Object.defineProperty(Rt,"__esModule",{value:!0});Rt.DocumentOnTypeFormattingFeature=Rt.DocumentRangeFormattingFeature=Rt.DocumentFormattingFeature=void 0;var ks=require("vscode"),en=oe(),xd=aS(Fe()),Zn=ge(),Pi;(function(n){function e(t){let r=ks.workspace.getConfiguration("files",t);return{trimTrailingWhitespace:r.get("trimTrailingWhitespace"),trimFinalNewlines:r.get("trimFinalNewlines"),insertFinalNewline:r.get("insertFinalNewline")}}n.fromConfiguration=e})(Pi||(Pi={}));var Td=class extends Zn.TextDocumentLanguageFeature{constructor(e){super(e,en.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,Zn.ensure)((0,Zn.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentFormattingProvider);r&&this.register({id:xd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentFormattingEdits:(i,o,s)=>{let a=this._client,u=(f,h,p)=>{let m={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),options:a.code2ProtocolConverter.asFormattingOptions(h,Pi.fromConfiguration(f))};return a.sendRequest(en.DocumentFormattingRequest.type,m,p).then(b=>p.isCancellationRequested?null:a.protocol2CodeConverter.asTextEdits(b,p),b=>a.handleFailedRequest(en.DocumentFormattingRequest.type,p,b,null))},l=a.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,o,s,u):u(i,o,s)}};return[ks.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Rt.DocumentFormattingFeature=Td;var Od=class extends Zn.TextDocumentLanguageFeature{constructor(e){super(e,en.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){let t=(0,Zn.ensure)((0,Zn.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);r&&this.register({id:xd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentRangeFormattingEdits:(i,o,s,a)=>{let u=this._client,l=(h,p,m,b)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),range:u.code2ProtocolConverter.asRange(p),options:u.code2ProtocolConverter.asFormattingOptions(m,Pi.fromConfiguration(h))};return u.sendRequest(en.DocumentRangeFormattingRequest.type,C,b).then(j=>b.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(j,b),j=>u.handleFailedRequest(en.DocumentRangeFormattingRequest.type,b,j,null))},f=u.middleware;return f.provideDocumentRangeFormattingEdits?f.provideDocumentRangeFormattingEdits(i,o,s,a,l):l(i,o,s,a)}};return e.rangesSupport&&(r.provideDocumentRangesFormattingEdits=(i,o,s,a)=>{let u=this._client,l=(h,p,m,b)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),ranges:u.code2ProtocolConverter.asRanges(p),options:u.code2ProtocolConverter.asFormattingOptions(m,Pi.fromConfiguration(h))};return u.sendRequest(en.DocumentRangesFormattingRequest.type,C,b).then(j=>b.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(j,b),j=>u.handleFailedRequest(en.DocumentRangesFormattingRequest.type,b,j,null))},f=u.middleware;return f.provideDocumentRangesFormattingEdits?f.provideDocumentRangesFormattingEdits(i,o,s,a,l):l(i,o,s,a)}),[ks.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Rt.DocumentRangeFormattingFeature=Od;var qd=class extends Zn.TextDocumentLanguageFeature{constructor(e){super(e,en.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,Zn.ensure)((0,Zn.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);r&&this.register({id:xd.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideOnTypeFormattingEdits:(o,s,a,u,l)=>{let f=this._client,h=(m,b,C,j,U)=>{let E={textDocument:f.code2ProtocolConverter.asTextDocumentIdentifier(m),position:f.code2ProtocolConverter.asPosition(b),ch:C,options:f.code2ProtocolConverter.asFormattingOptions(j,Pi.fromConfiguration(m))};return f.sendRequest(en.DocumentOnTypeFormattingRequest.type,E,U).then(L=>U.isCancellationRequested?null:f.protocol2CodeConverter.asTextEdits(L,U),L=>f.handleFailedRequest(en.DocumentOnTypeFormattingRequest.type,U,L,null))},p=f.middleware;return p.provideOnTypeFormattingEdits?p.provideOnTypeFormattingEdits(o,s,a,u,l,h):h(o,s,a,u,l)}},i=e.moreTriggerCharacter||[];return[ks.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r,e.firstTriggerCharacter,...i),r]}};Rt.DocumentOnTypeFormattingFeature=qd});var Sy=F(Cn=>{"use strict";y();var cS=Cn&&Cn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),uS=Cn&&Cn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Dy=Cn&&Cn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&cS(t,e,r[i]);return uS(t,e),t}})();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.RenameFeature=void 0;var lS=require("vscode"),Ar=oe(),dS=Dy(Fe()),wy=Dy(Qt()),Md=ge(),Ed=class extends Md.TextDocumentLanguageFeature{constructor(e){super(e,Ar.RenameRequest.type)}fillClientCapabilities(e){let t=(0,Md.ensure)((0,Md.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=Ar.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.renameProvider);r&&(wy.boolean(e.renameProvider)&&(r.prepareProvider=!1),this.register({id:dS.generateUuid(),registerOptions:r}))}registerLanguageProvider(e){let t=e.documentSelector,r={provideRenameEdits:(i,o,s,a)=>{let u=this._client,l=(h,p,m,b)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),position:u.code2ProtocolConverter.asPosition(p),newName:m};return u.sendRequest(Ar.RenameRequest.type,C,b).then(j=>b.isCancellationRequested?null:u.protocol2CodeConverter.asWorkspaceEdit(j,b),j=>u.handleFailedRequest(Ar.RenameRequest.type,b,j,null,!1))},f=u.middleware;return f.provideRenameEdits?f.provideRenameEdits(i,o,s,a,l):l(i,o,s,a)},prepareRename:e.prepareProvider?(i,o,s)=>{let a=this._client,u=(f,h,p)=>{let m={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),position:a.code2ProtocolConverter.asPosition(h)};return a.sendRequest(Ar.PrepareRenameRequest.type,m,p).then(b=>p.isCancellationRequested?null:Ar.Range.is(b)?a.protocol2CodeConverter.asRange(b):this.isDefaultBehavior(b)?b.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):b&&Ar.Range.is(b.range)?{range:a.protocol2CodeConverter.asRange(b.range),placeholder:b.placeholder}:Promise.reject(new Error("The element can't be renamed.")),b=>{throw typeof b.message=="string"?new Error(b.message):new Error("The element can't be renamed.")})},l=a.middleware;return l.prepareRename?l.prepareRename(i,o,s,u):u(i,o,s)}:void 0};return[this.registerProvider(t,r),r]}registerProvider(e,t){return lS.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){let t=e;return t&&wy.boolean(t.defaultBehavior)}};Cn.RenameFeature=Ed});var Py=F(wn=>{"use strict";y();var fS=wn&&wn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),hS=wn&&wn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),pS=wn&&wn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&fS(t,e,r[i]);return hS(t,e),t}})();Object.defineProperty(wn,"__esModule",{value:!0});wn.DocumentLinkFeature=void 0;var gS=require("vscode"),go=oe(),jd=ge(),mS=pS(Fe()),Fd=class extends jd.TextDocumentLanguageFeature{constructor(e){super(e,go.DocumentLinkRequest.type)}fillClientCapabilities(e){let t=(0,jd.ensure)((0,jd.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.documentLinkProvider);r&&this.register({id:mS.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDocumentLinks:(i,o)=>{let s=this._client,a=(l,f)=>s.sendRequest(go.DocumentLinkRequest.type,s.code2ProtocolConverter.asDocumentLinkParams(l),f).then(h=>f.isCancellationRequested?null:s.protocol2CodeConverter.asDocumentLinks(h,f),h=>s.handleFailedRequest(go.DocumentLinkRequest.type,f,h,null)),u=s.middleware;return u.provideDocumentLinks?u.provideDocumentLinks(i,o,a):a(i,o)},resolveDocumentLink:e.resolveProvider?(i,o)=>{let s=this._client,a=(l,f)=>s.sendRequest(go.DocumentLinkResolveRequest.type,s.code2ProtocolConverter.asDocumentLink(l),f).then(h=>f.isCancellationRequested?l:s.protocol2CodeConverter.asDocumentLink(h),h=>s.handleFailedRequest(go.DocumentLinkResolveRequest.type,f,h,l)),u=s.middleware;return u.resolveDocumentLink?u.resolveDocumentLink(i,o,a):a(i,o)}:void 0};return[gS.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};wn.DocumentLinkFeature=Fd});var Ty=F(Dn=>{"use strict";y();var yS=Dn&&Dn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vS=Dn&&Dn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),_S=Dn&&Dn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&yS(t,e,r[i]);return vS(t,e),t}})();Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ExecuteCommandFeature=void 0;var bS=require("vscode"),Id=oe(),CS=_S(Fe()),Ry=ge(),Nd=class{_client;_commands;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 Id.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,Ry.ensure)((0,Ry.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:CS.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,r=t.middleware,i=(o,s)=>{let a={command:o,arguments:s};return t.sendRequest(Id.ExecuteCommandRequest.type,a).then(void 0,u=>t.handleFailedRequest(Id.ExecuteCommandRequest.type,void 0,u,void 0))};if(e.registerOptions.commands){let o=[];for(let s of e.registerOptions.commands)o.push(bS.commands.registerCommand(s,(...a)=>r.executeCommand?r.executeCommand(s,a,i):i(s,a)));this._commands.set(e.id,o)}}unregister(e){let t=this._commands.get(e);t&&(this._commands.delete(e),t.forEach(r=>r.dispose()))}clear(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};Dn.ExecuteCommandFeature=Nd});var qy=F(As=>{"use strict";y();Object.defineProperty(As,"__esModule",{value:!0});As.FoldingRangeFeature=void 0;var Oy=require("vscode"),Lr=oe(),mo=ge(),kd=class extends mo.TextDocumentLanguageFeature{constructor(e){super(e,Lr.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,mo.ensure)((0,mo.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[Lr.FoldingRangeKind.Comment,Lr.FoldingRangeKind.Imports,Lr.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,mo.ensure)((0,mo.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(Lr.FoldingRangeRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeFoldingRange.fire()});let[r,i]=this.getRegistration(t,e.foldingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Oy.EventEmitter,i={onDidChangeFoldingRanges:r.event,provideFoldingRanges:(o,s,a)=>{let u=this._client,l=(h,p,m)=>{let b={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h)};return u.sendRequest(Lr.FoldingRangeRequest.type,b,m).then(C=>m.isCancellationRequested?null:u.protocol2CodeConverter.asFoldingRanges(C,m),C=>u.handleFailedRequest(Lr.FoldingRangeRequest.type,m,C,null))},f=u.middleware;return f.provideFoldingRanges?f.provideFoldingRanges(o,s,a,l):l(o,s,a)}};return[Oy.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeFoldingRange:r}]}};As.FoldingRangeFeature=kd});var xy=F(Ls=>{"use strict";y();Object.defineProperty(Ls,"__esModule",{value:!0});Ls.DeclarationFeature=void 0;var wS=require("vscode"),Ad=oe(),Ld=ge(),Hd=class extends Ld.TextDocumentLanguageFeature{constructor(e){super(e,Ad.DeclarationRequest.type)}fillClientCapabilities(e){let t=(0,Ld.ensure)((0,Ld.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.declarationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideDeclaration:(i,o,s)=>{let a=this._client,u=(f,h,p)=>a.sendRequest(Ad.DeclarationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,h),p).then(m=>p.isCancellationRequested?null:a.protocol2CodeConverter.asDeclarationResult(m,p),m=>a.handleFailedRequest(Ad.DeclarationRequest.type,p,m,null)),l=a.middleware;return l.provideDeclaration?l.provideDeclaration(i,o,s,u):u(i,o,s)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return wS.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Ls.DeclarationFeature=Hd});var My=F(Hs=>{"use strict";y();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.SelectionRangeFeature=void 0;var DS=require("vscode"),Ud=oe(),Wd=ge(),$d=class extends Wd.TextDocumentLanguageFeature{constructor(e){super(e,Ud.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=(0,Wd.ensure)((0,Wd.ensure)(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.selectionRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideSelectionRanges:(i,o,s)=>{let a=this._client,u=async(f,h,p)=>{let m={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(f),positions:a.code2ProtocolConverter.asPositionsSync(h,p)};return a.sendRequest(Ud.SelectionRangeRequest.type,m,p).then(b=>p.isCancellationRequested?null:a.protocol2CodeConverter.asSelectionRanges(b,p),b=>a.handleFailedRequest(Ud.SelectionRangeRequest.type,p,b,null))},l=a.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,o,s,u):u(i,o,s)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return DS.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Hs.SelectionRangeFeature=$d});var Ey=F(Us=>{"use strict";y();Object.defineProperty(Us,"__esModule",{value:!0});Us.CallHierarchyFeature=void 0;var SS=require("vscode"),Hr=oe(),zd=ge(),Kd=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,r){let i=this.client,o=this.middleware,s=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(Hr.CallHierarchyPrepareRequest.type,f,l).then(h=>l.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(h,l),h=>i.handleFailedRequest(Hr.CallHierarchyPrepareRequest.type,l,h,null))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,r,s):s(e,t,r)}provideCallHierarchyIncomingCalls(e,t){let r=this.client,i=this.middleware,o=(s,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(s)};return r.sendRequest(Hr.CallHierarchyIncomingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyIncomingCalls(l,a),l=>r.handleFailedRequest(Hr.CallHierarchyIncomingCallsRequest.type,a,l,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){let r=this.client,i=this.middleware,o=(s,a)=>{let u={item:r.code2ProtocolConverter.asCallHierarchyItem(s)};return r.sendRequest(Hr.CallHierarchyOutgoingCallsRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyOutgoingCalls(l,a),l=>r.handleFailedRequest(Hr.CallHierarchyOutgoingCallsRequest.type,a,l,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,o):o(e,t)}},Bd=class extends zd.TextDocumentLanguageFeature{constructor(e){super(e,Hr.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=e,r=(0,zd.ensure)((0,zd.ensure)(t,"textDocument"),"callHierarchy");r.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.callHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new Kd(t);return[SS.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};Us.CallHierarchyFeature=Bd});var Fy=F(Sn=>{"use strict";y();var PS=Sn&&Sn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),RS=Sn&&Sn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),jy=Sn&&Sn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&PS(t,e,r[i]);return RS(t,e),t}})();Object.defineProperty(Sn,"__esModule",{value:!0});Sn.SemanticTokensFeature=void 0;var Ws=jy(require("vscode")),ce=oe(),yo=ge(),TS=jy(Qt()),Vd=class extends yo.TextDocumentLanguageFeature{constructor(e){super(e,ce.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){let t=(0,yo.ensure)((0,yo.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[ce.SemanticTokenTypes.namespace,ce.SemanticTokenTypes.type,ce.SemanticTokenTypes.class,ce.SemanticTokenTypes.enum,ce.SemanticTokenTypes.interface,ce.SemanticTokenTypes.struct,ce.SemanticTokenTypes.typeParameter,ce.SemanticTokenTypes.parameter,ce.SemanticTokenTypes.variable,ce.SemanticTokenTypes.property,ce.SemanticTokenTypes.enumMember,ce.SemanticTokenTypes.event,ce.SemanticTokenTypes.function,ce.SemanticTokenTypes.method,ce.SemanticTokenTypes.macro,ce.SemanticTokenTypes.keyword,ce.SemanticTokenTypes.comment,ce.SemanticTokenTypes.string,ce.SemanticTokenTypes.number,ce.SemanticTokenTypes.regexp,ce.SemanticTokenTypes.operator,ce.SemanticTokenTypes.decorator,ce.SemanticTokenTypes.label],t.tokenModifiers=[ce.SemanticTokenModifiers.declaration,ce.SemanticTokenModifiers.definition,ce.SemanticTokenModifiers.readonly,ce.SemanticTokenModifiers.static,ce.SemanticTokenModifiers.deprecated,ce.SemanticTokenModifiers.abstract,ce.SemanticTokenModifiers.async,ce.SemanticTokenModifiers.modification,ce.SemanticTokenModifiers.documentation,ce.SemanticTokenModifiers.defaultLibrary],t.formats=[ce.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,yo.ensure)((0,yo.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(ce.SemanticTokensRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeSemanticTokensEmitter.fire()});let[i,o]=this.getRegistration(t,e.semanticTokensProvider);!i||!o||this.register({id:i,registerOptions:o})}registerLanguageProvider(e){let t=e.documentSelector,r=TS.boolean(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,o=new Ws.EventEmitter,s=r?{onDidChangeSemanticTokens:o.event,provideDocumentSemanticTokens:(m,b)=>{let C=this._client,j=C.middleware,U=(E,L)=>{let Y={textDocument:C.code2ProtocolConverter.asTextDocumentIdentifier(E)};return C.sendRequest(ce.SemanticTokensRequest.type,Y,L).then(k=>L.isCancellationRequested?null:C.protocol2CodeConverter.asSemanticTokens(k,L),k=>C.handleFailedRequest(ce.SemanticTokensRequest.type,L,k,null))};return j.provideDocumentSemanticTokens?j.provideDocumentSemanticTokens(m,b,U):U(m,b)},provideDocumentSemanticTokensEdits:i?(m,b,C)=>{let j=this._client,U=j.middleware,E=(L,Y,k)=>{let le={textDocument:j.code2ProtocolConverter.asTextDocumentIdentifier(L),previousResultId:Y};return j.sendRequest(ce.SemanticTokensDeltaRequest.type,le,k).then(async ue=>k.isCancellationRequested?null:ce.SemanticTokens.is(ue)?await j.protocol2CodeConverter.asSemanticTokens(ue,k):await j.protocol2CodeConverter.asSemanticTokensEdits(ue,k),ue=>j.handleFailedRequest(ce.SemanticTokensDeltaRequest.type,k,ue,null))};return U.provideDocumentSemanticTokensEdits?U.provideDocumentSemanticTokensEdits(m,b,C,E):E(m,b,C)}:void 0}:void 0,u=e.range===!0?{onDidChangeSemanticTokens:o.event,provideDocumentRangeSemanticTokens:(m,b,C)=>{let j=this._client,U=j.middleware,E=(L,Y,k)=>{let le={textDocument:j.code2ProtocolConverter.asTextDocumentIdentifier(L),range:j.code2ProtocolConverter.asRange(Y)};return j.sendRequest(ce.SemanticTokensRangeRequest.type,le,k).then(ue=>k.isCancellationRequested?null:j.protocol2CodeConverter.asSemanticTokens(ue,k),ue=>j.handleFailedRequest(ce.SemanticTokensRangeRequest.type,k,ue,null))};return U.provideDocumentRangeSemanticTokens?U.provideDocumentRangeSemanticTokens(m,b,C,E):E(m,b,C)}}:void 0,l=[],f=this._client,h=f.protocol2CodeConverter.asSemanticTokensLegend(e.legend),p=f.protocol2CodeConverter.asDocumentSelector(t);return s!==void 0&&l.push(Ws.languages.registerDocumentSemanticTokensProvider(p,s,h)),u!==void 0&&l.push(Ws.languages.registerDocumentRangeSemanticTokensProvider(p,u,h)),[new Ws.Disposable(()=>l.forEach(m=>m.dispose())),{range:u,full:s,onDidChangeSemanticTokensEmitter:o}]}};Sn.SemanticTokensFeature=Vd});var Ny=F(Pn=>{"use strict";y();var OS=Pn&&Pn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),qS=Pn&&Pn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Iy=Pn&&Pn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&OS(t,e,r[i]);return qS(t,e),t}})();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.LinkedEditingFeature=void 0;var xS=Iy(require("vscode")),Gd=Iy(oe()),Jd=ge(),Qd=class extends Jd.TextDocumentLanguageFeature{constructor(e){super(e,Gd.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){let t=(0,Jd.ensure)((0,Jd.ensure)(e,"textDocument"),"linkedEditingRange");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.linkedEditingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r={provideLinkedEditingRanges:(i,o,s)=>{let a=this._client,u=(f,h,p)=>a.sendRequest(Gd.LinkedEditingRangeRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(f,h),p).then(m=>p.isCancellationRequested?null:a.protocol2CodeConverter.asLinkedEditingRanges(m,p),m=>a.handleFailedRequest(Gd.LinkedEditingRangeRequest.type,p,m,null)),l=a.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,o,s,u):u(i,o,s)}};return[this.registerProvider(t,r),r]}registerProvider(e,t){return xS.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Pn.LinkedEditingFeature=Qd});var ky=F($s=>{"use strict";y();Object.defineProperty($s,"__esModule",{value:!0});$s.TypeHierarchyFeature=void 0;var MS=require("vscode"),Ur=oe(),Xd=ge(),Zd=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,r){let i=this.client,o=this.middleware,s=(a,u,l)=>{let f=i.code2ProtocolConverter.asTextDocumentPositionParams(a,u);return i.sendRequest(Ur.TypeHierarchyPrepareRequest.type,f,l).then(h=>l.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(h,l),h=>i.handleFailedRequest(Ur.TypeHierarchyPrepareRequest.type,l,h,null))};return o.prepareTypeHierarchy?o.prepareTypeHierarchy(e,t,r,s):s(e,t,r)}provideTypeHierarchySupertypes(e,t){let r=this.client,i=this.middleware,o=(s,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(s)};return r.sendRequest(Ur.TypeHierarchySupertypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Ur.TypeHierarchySupertypesRequest.type,a,l,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,o):o(e,t)}provideTypeHierarchySubtypes(e,t){let r=this.client,i=this.middleware,o=(s,a)=>{let u={item:r.code2ProtocolConverter.asTypeHierarchyItem(s)};return r.sendRequest(Ur.TypeHierarchySubtypesRequest.type,u,a).then(l=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(l,a),l=>r.handleFailedRequest(Ur.TypeHierarchySubtypesRequest.type,a,l,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,o):o(e,t)}},Yd=class extends Xd.TextDocumentLanguageFeature{constructor(e){super(e,Ur.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=(0,Xd.ensure)((0,Xd.ensure)(e,"textDocument"),"typeHierarchy");t.dynamicRegistration=!0}initialize(e,t){let[r,i]=this.getRegistration(t,e.typeHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=this._client,r=new Zd(t);return[MS.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};$s.TypeHierarchyFeature=Yd});var Ly=F(Ks=>{"use strict";y();Object.defineProperty(Ks,"__esModule",{value:!0});Ks.InlineValueFeature=void 0;var Ay=require("vscode"),zs=oe(),vo=ge(),ef=class extends vo.TextDocumentLanguageFeature{constructor(e){super(e,zs.InlineValueRequest.type)}fillClientCapabilities(e){(0,vo.ensure)((0,vo.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,vo.ensure)((0,vo.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(zs.InlineValueRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeInlineValues.fire()});let[r,i]=this.getRegistration(t,e.inlineValueProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Ay.EventEmitter,i={onDidChangeInlineValues:r.event,provideInlineValues:(o,s,a,u)=>{let l=this._client,f=(p,m,b,C)=>{let j={textDocument:l.code2ProtocolConverter.asTextDocumentIdentifier(p),range:l.code2ProtocolConverter.asRange(m),context:l.code2ProtocolConverter.asInlineValueContext(b)};return l.sendRequest(zs.InlineValueRequest.type,j,C).then(U=>C.isCancellationRequested?null:l.protocol2CodeConverter.asInlineValues(U,C),U=>l.handleFailedRequest(zs.InlineValueRequest.type,C,U,null))},h=l.middleware;return h.provideInlineValues?h.provideInlineValues(o,s,a,u,f):f(o,s,a,u)}};return[this.registerProvider(t,i),{provider:i,onDidChangeInlineValues:r}]}registerProvider(e,t){return Ay.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Ks.InlineValueFeature=ef});var Uy=F(Bs=>{"use strict";y();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.InlayHintsFeature=void 0;var Hy=require("vscode"),Ri=oe(),_o=ge(),tf=class extends _o.TextDocumentLanguageFeature{constructor(e){super(e,Ri.InlayHintRequest.type)}fillClientCapabilities(e){let 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(Ri.InlayHintRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeInlayHints.fire()});let[r,i]=this.getRegistration(t,e.inlayHintProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,r=new Hy.EventEmitter,i={onDidChangeInlayHints:r.event,provideInlayHints:(o,s,a)=>{let u=this._client,l=async(h,p,m)=>{let b={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),range:u.code2ProtocolConverter.asRange(p)};try{let C=await u.sendRequest(Ri.InlayHintRequest.type,b,m);return m.isCancellationRequested?null:u.protocol2CodeConverter.asInlayHints(C,m)}catch(C){return u.handleFailedRequest(Ri.InlayHintRequest.type,m,C,null)}},f=u.middleware;return f.provideInlayHints?f.provideInlayHints(o,s,a,l):l(o,s,a)}};return i.resolveInlayHint=e.resolveProvider===!0?(o,s)=>{let a=this._client,u=async(f,h)=>{try{let p=await a.sendRequest(Ri.InlayHintResolveRequest.type,a.code2ProtocolConverter.asInlayHint(f),h);if(h.isCancellationRequested)return null;let m=a.protocol2CodeConverter.asInlayHint(p,h);return h.isCancellationRequested?null:m}catch(p){return a.handleFailedRequest(Ri.InlayHintResolveRequest.type,h,p,null)}},l=a.middleware;return l.resolveInlayHint?l.resolveInlayHint(o,s,u):u(o,s)}:void 0,[this.registerProvider(t,i),{provider:i,onDidChangeInlayHints:r}]}registerProvider(e,t){return Hy.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Bs.InlayHintsFeature=tf});var Wy=F(tn=>{"use strict";y();var ES=tn&&tn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),jS=tn&&tn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),FS=tn&&tn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&ES(t,e,r[i]);return jS(t,e),t}})();Object.defineProperty(tn,"__esModule",{value:!0});tn.WorkspaceFoldersFeature=void 0;tn.arrayDiff=rf;var IS=FS(Fe()),Vs=require("vscode"),bo=oe();function nf(n,e){if(n!=null)return n[e]}function rf(n,e){return n.filter(t=>e.indexOf(t)<0)}var of=class{_client;_listeners;_initialFolders;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 bo.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=Vs.workspace.workspaceFolders;this.initializeWithFolders(t),t===void 0?e.workspaceFolders=null:e.workspaceFolders=t.map(r=>this.asProtocol(r))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(bo.WorkspaceFoldersRequest.type,o=>{let s=()=>{let u=Vs.workspace.workspaceFolders;return u===void 0?null:u.map(f=>this.asProtocol(f))},a=t.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(o,s):s(o)});let r=nf(nf(nf(e,"workspace"),"workspaceFolders"),"changeNotifications"),i;typeof r=="string"?i=r:r===!0&&(i=IS.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){let r=rf(this._initialFolders,e),i=rf(e,this._initialFolders);(i.length>0||r.length>0)&&(t=this.doSendEvent(i,r))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));t!==void 0&&t.catch(r=>{this._client.error(`Sending notification ${bo.DidChangeWorkspaceFoldersNotification.type.method} failed`,r)})}doSendEvent(e,t){let r={event:{added:e.map(i=>this.asProtocol(i)),removed:t.map(i=>this.asProtocol(i))}};return this._client.sendNotification(bo.DidChangeWorkspaceFoldersNotification.type,r)}register(e){let t=e.id,r=this._client,i=Vs.workspace.onDidChangeWorkspaceFolders(o=>{let s=l=>this.doSendEvent(l.added,l.removed),a=r.middleware.workspace;(a&&a.didChangeWorkspaceFolders?a.didChangeWorkspaceFolders(o,s):s(o)).catch(l=>{this._client.error(`Sending notification ${bo.DidChangeWorkspaceFoldersNotification.type.method} failed`,l)})});this._listeners.set(t,i),this.sendInitialEvent(Vs.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return e===void 0?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}};tn.WorkspaceFoldersFeature=of});var Ky=F(Ze=>{"use strict";y();var NS=Ze&&Ze.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kS=Ze&&Ze.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Qs=Ze&&Ze.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&NS(t,e,r[i]);return kS(t,e),t}})();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.WillDeleteFilesFeature=Ze.WillRenameFilesFeature=Ze.WillCreateFilesFeature=Ze.DidDeleteFilesFeature=Ze.DidRenameFilesFeature=Ze.DidCreateFilesFeature=void 0;var Kt=Qs(require("vscode")),AS=Qs(al()),Yn=Qs(oe()),LS=Qs(Fe());function $y(n,e){return n[e]===void 0&&(n[e]={}),n[e]}function HS(n,e){return n[e]}function zy(n,e,t){n[e]=t}var Co=class n{_client;_event;_registrationType;_clientCapability;_serverCapability;_listener;_filters;constructor(e,t,r,i,o){this._client=e,this._event=t,this._registrationType=r,this._clientCapability=i,this._serverCapability=o,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){let t=$y($y(e,"workspace"),"fileOperations");zy(t,"dynamicRegistration",!0),zy(t,this._clientCapability,!0)}initialize(e){let t=e.workspace?.fileOperations,r=t!==void 0?HS(t,this._serverCapability):void 0;if(r?.filters!==void 0)try{this.register({id:LS.generateUuid(),registerOptions:{filters:r.filters}})}catch(i){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${i}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(r=>{let i=new AS.Minimatch(r.pattern.glob,n.asMinimatchOptions(r.pattern.options));if(!i.makeRe())throw new Error(`Invalid pattern ${r.pattern.glob}!`);return{scheme:r.scheme,matcher:i,kind:r.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&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 n.getFileType(e)}async filter(e,t){let r=await Promise.all(e.files.map(async o=>{let s=t(o),a=s.fsPath.replace(/\\/g,"/");for(let u of this._filters.values())for(let l of u)if(!(l.scheme!==void 0&&l.scheme!==s.scheme)){if(l.matcher.match(a)){if(l.kind===void 0)return!0;let f=await this.getFileType(s);if(f===void 0)return this._client.info(`Unable to determine file type for ${s.toString()}. Treating as a match.`),!0;if(f===Kt.FileType.File&&l.kind===Yn.FileOperationPatternKind.file||f===Kt.FileType.Directory&&l.kind===Yn.FileOperationPatternKind.folder)return!0}else if(l.kind===Yn.FileOperationPatternKind.folder&&await n.getFileType(s)===Kt.FileType.Directory&&l.matcher.match(`${a}/`))return!0}return!1})),i=e.files.filter((o,s)=>r[s]);return{...e,files:i}}static async getFileType(e){try{return(await Kt.workspace.fs.stat(e)).type}catch{return}}static asMinimatchOptions(e){let t={dot:!0};return e?.ignoreCase===!0&&(t.nocase=!0),t}},Gs=class extends Co{_notificationType;_accessUri;_createParams;constructor(e,t,r,i,o,s,a){super(e,t,r,i,o),this._notificationType=r,this._accessUri=s,this._createParams=a}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=async i=>this._client.sendNotification(this._notificationType,this._createParams(i));return this.doSend(t,r)}}},Js=class extends Gs{_willListener;_fsPathFileTypes=new Map;async getFileType(e){let t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);let r=await Co.getFileType(e);return r&&this._fsPathFileTypes.set(t,r),r}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),this.filterSize()===0&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}},sf=class extends Gs{constructor(e){super(e,Kt.workspace.onDidCreateFiles,Yn.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.didCreateFiles?r.didCreateFiles(e,t):t(e)}};Ze.DidCreateFilesFeature=sf;var af=class extends Js{constructor(e){super(e,Kt.workspace.onDidRenameFiles,Yn.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=Kt.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,t=>t.oldUri))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didRenameFiles?r.didRenameFiles(e,t):t(e)}};Ze.DidRenameFilesFeature=af;var cf=class extends Js{constructor(e){super(e,Kt.workspace.onDidDeleteFiles,Yn.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=Kt.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,t=>t))}doSend(e,t){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didDeleteFiles?r.didDeleteFiles(e,t):t(e)}};Ze.DidDeleteFilesFeature=cf;var wo=class extends Co{_requestType;_accessUri;_createParams;constructor(e,t,r,i,o,s,a){super(e,t,r,i,o),this._requestType=r,this._accessUri=s,this._createParams=a}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let r=i=>this._client.sendRequest(this._requestType,this._createParams(i),i.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,r)}else return}},uf=class extends wo{constructor(e){super(e,Kt.workspace.onWillCreateFiles,Yn.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willCreateFiles?r.willCreateFiles(e,t):t(e)}};Ze.WillCreateFilesFeature=uf;var lf=class extends wo{constructor(e){super(e,Kt.workspace.onWillRenameFiles,Yn.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willRenameFiles?r.willRenameFiles(e,t):t(e)}};Ze.WillRenameFilesFeature=lf;var df=class extends wo{constructor(e){super(e,Kt.workspace.onWillDeleteFiles,Yn.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){let r=this._client.middleware.workspace;return r?.willDeleteFiles?r.willDeleteFiles(e,t):t(e)}};Ze.WillDeleteFilesFeature=df});var By=F(Rn=>{"use strict";y();var US=Rn&&Rn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),WS=Rn&&Rn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),$S=Rn&&Rn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&US(t,e,r[i]);return WS(t,e),t}})();Object.defineProperty(Rn,"__esModule",{value:!0});Rn.InlineCompletionItemFeature=void 0;var zS=require("vscode"),ff=oe(),hf=ge(),KS=$S(Fe()),pf=class extends hf.TextDocumentLanguageFeature{constructor(e){super(e,ff.InlineCompletionRequest.type)}fillClientCapabilities(e){let t=(0,hf.ensure)((0,hf.ensure)(e,"textDocument"),"inlineCompletion");t.dynamicRegistration=!0}initialize(e,t){let r=this.getRegistrationOptions(t,e.inlineCompletionProvider);r&&this.register({id:KS.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,r={provideInlineCompletionItems:(i,o,s,a)=>{let u=this._client,l=this._client.middleware,f=(h,p,m,b)=>u.sendRequest(ff.InlineCompletionRequest.type,u.code2ProtocolConverter.asInlineCompletionParams(h,p,m),b).then(C=>b.isCancellationRequested?null:u.protocol2CodeConverter.asInlineCompletionResult(C,b),C=>u.handleFailedRequest(ff.InlineCompletionRequest.type,b,C,null));return l.provideInlineCompletionItems?l.provideInlineCompletionItems(i,o,s,a,f):f(i,o,s,a)}};return[zS.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),r]}};Rn.InlineCompletionItemFeature=pf});var Jy=F(Tn=>{"use strict";y();var BS=Tn&&Tn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),VS=Tn&&Tn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Gy=Tn&&Tn.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&BS(t,e,r[i]);return VS(t,e),t}})();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.TextDocumentContentFeature=void 0;var gf=Gy(require("vscode")),Ti=oe(),Vy=ge(),GS=Gy(Fe()),mf=class{_client;_registrations=new Map;constructor(e){this._client=e}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:Ti.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return Ti.TextDocumentContentRequest.type}getProviders(){let e=[];for(let t of this._registrations.values())e.push(...t.providers);return e}fillClientCapabilities(e){let t=(0,Vy.ensure)((0,Vy.ensure)(e,"workspace"),"textDocumentContent");t.dynamicRegistration=!0}initialize(e){let t=this._client;if(t.onRequest(Ti.TextDocumentContentRefreshRequest.type,async o=>{let s=t.protocol2CodeConverter.asUri(o.uri);for(let a of this._registrations.values())for(let u of a.providers)u.scheme===s.scheme&&u.onDidChangeEmitter.fire(s)}),!e?.workspace?.textDocumentContent)return;let r=e.workspace.textDocumentContent,i=Ti.StaticRegistrationOptions.hasId(r)?r.id:GS.generateUuid();this.register({id:i,registerOptions:r})}register(e){let t=[],r=[];for(let i of e.registerOptions.schemes){let[o,s]=this.registerTextDocumentContentProvider(i);t.push(s),r.push(o)}this._registrations.set(e.id,{disposable:gf.Disposable.from(...r),providers:t})}registerTextDocumentContentProvider(e){let t=new gf.EventEmitter,r={onDidChange:t.event,provideTextDocumentContent:(i,o)=>{let s=this._client,a=(l,f)=>{let h={uri:s.code2ProtocolConverter.asUri(l)};return s.sendRequest(Ti.TextDocumentContentRequest.type,h,f).then(p=>f.isCancellationRequested?null:p.text,p=>s.handleFailedRequest(Ti.TextDocumentContentRequest.type,f,p,null))},u=s.middleware;return u.provideTextDocumentContent?u.provideTextDocumentContent(i,o,a):a(i,o)}};return[gf.workspace.registerTextDocumentContentProvider(e,r),{scheme:e,onDidChangeEmitter:t,provider:r}]}unregister(e){let t=this._registrations.get(e);t!==void 0&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}};Tn.TextDocumentContentFeature=mf});var Qy=F(Zs=>{"use strict";y();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.FileSystemWatcherFeature=void 0;var JS=require("vscode"),Wr=oe(),Xs=ge(),yf=class{_client;_notifyFileEvent;_watchers;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 Wr.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,Xs.ensure)((0,Xs.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,Xs.ensure)((0,Xs.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let r of e.registerOptions.watchers){let i=this._client.protocol2CodeConverter.asGlobPattern(r.globPattern);if(i===void 0)continue;let o=!0,s=!0,a=!0;r.kind!==void 0&&r.kind!==null&&(o=(r.kind&Wr.WatchKind.Create)!==0,s=(r.kind&Wr.WatchKind.Change)!==0,a=(r.kind&Wr.WatchKind.Delete)!==0);let u=JS.workspace.createFileSystemWatcher(i,!o,!s,!a);this.hookListeners(u,o,s,a,t),t.push(u)}this._watchers.set(e.id,t)}registerRaw(e,t){let r=[];for(let i of t)this.hookListeners(i,!0,!0,!0,r);this._watchers.set(e,r)}hookListeners(e,t,r,i,o){t&&e.onDidCreate(s=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(s),type:Wr.FileChangeType.Created}),null,o),r&&e.onDidChange(s=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(s),type:Wr.FileChangeType.Changed}),null,o),i&&e.onDidDelete(s=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(s),type:Wr.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t){this._watchers.delete(e);for(let r of t)r.dispose()}}clear(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}};Zs.FileSystemWatcherFeature=yf});var Zy=F(Ys=>{"use strict";y();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.ProgressFeature=void 0;var Xy=oe(),QS=Hl();function XS(n,e){return n[e]===void 0&&(n[e]=Object.create(null)),n[e]}var vf=class{_client;activeParts;constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:Xy.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){XS(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=i=>{this.activeParts.delete(i)},r=i=>{this.activeParts.add(new QS.ProgressPart(this._client,i.token,t))};e.onRequest(Xy.WorkDoneProgressCreateRequest.type,r)}clear(){for(let e of this.activeParts)e.done();this.activeParts.clear()}};Ys.ProgressFeature=vf});var rv=F(Pe=>{"use strict";y();var ZS=Pe&&Pe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),YS=Pe&&Pe.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),na=Pe&&Pe.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&ZS(t,e,r[i]);return YS(t,e),t}})();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.ProposedFeatures=Pe.LanguageClient=Pe.BaseLanguageClient=Pe.ShutdownMode=Pe.MessageTransports=Pe.SuspendMode=Pe.State=Pe.CloseAction=Pe.ErrorAction=Pe.RevealOutputChannelOn=void 0;var re=require("vscode"),N=oe(),eP=na(Bm()),tP=na(Jm()),nn=na(Qt()),ea=Ps(),Yy=na(Fe()),nP=Hl(),Nt=ge(),rP=gl(),bf=ty(),ev=iy(),Oi=oy(),iP=sy(),oP=ay(),sP=cy(),aP=ly(),cP=dy(),uP=dd(),lP=hy(),dP=py(),fP=gy(),hP=my(),pP=yy(),gP=vy(),mP=by(),_f=Cy(),yP=Sy(),vP=Py(),_P=Ty(),bP=qy(),CP=xy(),wP=My(),DP=Ey(),SP=Fy(),PP=Ny(),RP=ky(),TP=Ly(),OP=Uy(),qP=Wy(),qi=Ky(),xP=By(),MP=Jy(),EP=Qy(),jP=Zy(),$r;(function(n){n[n.Debug=0]="Debug",n[n.Info=1]="Info",n[n.Warn=2]="Warn",n[n.Error=3]="Error",n[n.Never=4]="Never"})($r||(Pe.RevealOutputChannelOn=$r={}));var Do;(function(n){n[n.Continue=1]="Continue",n[n.Shutdown=2]="Shutdown"})(Do||(Pe.ErrorAction=Do={}));var Sr;(function(n){n[n.DoNotRestart=1]="DoNotRestart",n[n.Restart=2]="Restart"})(Sr||(Pe.CloseAction=Sr={}));var xi;(function(n){n[n.Stopped=1]="Stopped",n[n.Starting=3]="Starting",n[n.StartFailed=4]="StartFailed",n[n.Running=2]="Running"})(xi||(Pe.State=xi={}));var tv;(function(n){n.off="off",n.on="on"})(tv||(Pe.SuspendMode=tv={}));var Cf;(function(n){function e(t){return t==null?!1:typeof t=="boolean"||typeof t=="object"&&t!==null&&nn.stringArray(t.enabledCommands)?t:!1}n.sanitizeIsTrusted=e})(Cf||(Cf={}));var wf=class{client;maxRestartCount;restarts;constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,r){return r&&r<=3?{action:Do.Continue}:{action:Do.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:Sr.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=180*1e3?{action:Sr.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:Sr.Restart})}},de;(function(n){n.Initial="initial",n.Starting="starting",n.StartFailed="startFailed",n.Running="running",n.Stopping="stopping",n.Stopped="stopped"})(de||(de={}));var nv;(function(n){function e(t){return t&&N.MessageReader.is(t.reader)&&N.MessageWriter.is(t.writer)}n.is=e})(nv||(Pe.MessageTransports=nv={}));var Dr;(function(n){n.Restart="restart",n.Stop="stop"})(Dr||(Pe.ShutdownMode=Dr={}));var Df=class n{open;_onOpen;_onClose;disposables;constructor(){this.disposables=[],this.open=new Set,this._onOpen=new re.EventEmitter,this._onClose=new re.EventEmitter,n.fillVisibleResources(this.open);let e=()=>{let t=this.open,r=new Set;n.fillVisibleResources(r);let i=new Set,o=new Set(r);for(let s of t.values())r.has(s)?o.delete(s):i.add(s);if(this.open=r,i.size>0){let s=new Set;for(let a of i)s.add(re.Uri.parse(a));this._onClose.fire(s)}if(o.size>0){let s=new Set;for(let a of o)s.add(re.Uri.parse(a));this._onOpen.fire(s)}};this.disposables.push(re.window.tabGroups.onDidChangeTabs(t=>{t.closed.length===0&&t.opened.length===0||e()})),this.disposables.push(re.window.onDidChangeVisibleTextEditors(t=>{e()}))}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposables.forEach(e=>e.dispose())}isActive(e){return e instanceof re.Uri?re.window.activeTextEditor?.document.uri===e:re.window.activeTextEditor?.document===e}isVisible(e){let t=e instanceof re.Uri?e:e.uri;return t.scheme===bf.NotebookDocumentSyncFeature.CellScheme?re.workspace.notebookDocuments.some(r=>this.open.has(r.uri.toString())?r.getCells().find(o=>o.document.uri.toString()===t.toString())!==void 0:!1):this.open.has(t.toString())}getResources(){let e=new Set;return n.fillVisibleResources(new Set,e),e}static fillVisibleResources(e,t){let r=e??new Set;for(let i of re.window.tabGroups.all)for(let o of i.tabs){let s=o.input,a;s instanceof re.TabInputText?a=s.uri:s instanceof re.TabInputTextDiff?a=s.modified:(s instanceof re.TabInputCustom||s instanceof re.TabInputNotebook)&&(a=s.uri),a!==void 0&&!r.has(a.toString())&&(r.add(a.toString()),t!==void 0&&t.add(a))}for(let i of re.window.visibleTextEditors){let o=i.document.uri;r.has(o.toString())||(r.add(o.toString()),t!==void 0&&t.add(o))}}},ta=class n{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_traceLogLevel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=N.TraceFormat.Text;_tracer;_c2p;_p2c;_visibleDocuments;constructor(e,t,r){this._id=e,this._name=t,r=r||{};let i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};r.markdown!==void 0&&(i.isTrusted=Cf.sanitizeIsTrusted(r.markdown.isTrusted),i.supportHtml=r.markdown.supportHtml===!0,i.supportThemeIcons=r.markdown.supportThemeIcons===!0),this._clientOptions={documentSelector:r.documentSelector??[],synchronize:r.synchronize??{},diagnosticCollectionName:r.diagnosticCollectionName,outputChannelName:r.outputChannelName??this._name,revealOutputChannelOn:r.revealOutputChannelOn??$r.Error,stdioEncoding:r.stdioEncoding??"utf8",initializationOptions:r.initializationOptions,initializationFailedHandler:r.initializationFailedHandler,progressOnInitialization:!!r.progressOnInitialization,errorHandler:r.errorHandler??this.createDefaultErrorHandler(r.connectionOptions?.maxRestartCount),middleware:r.middleware??{},uriConverters:r.uriConverters,workspaceFolder:r.workspaceFolder,connectionOptions:r.connectionOptions,markdown:i,diagnosticPullOptions:r.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:r.notebookDocumentOptions??{},textSynchronization:this.createTextSynchronizationOptions(r.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=de.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,r.outputChannel?(this._outputChannel=r.outputChannel,this._disposeOutputChannel=!1,this._traceLogLevel=this._outputChannel.logLevel):(this._outputChannel=void 0,this._disposeOutputChannel=!0,this._traceLogLevel=re.LogLevel.Info),this._traceOutputChannel=r.traceOutputChannel,this._traceOutputChannel!==void 0&&(this._traceLogLevel=this._traceOutputChannel.logLevel),this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new ea.Semaphore(1),this._pendingChangeDelayer=new ea.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new ea.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new N.Emitter,this._stateChangeEmitter=new N.Emitter,this._trace=N.Trace.Off,this._tracer={log:(o,s)=>{nn.string(o)?this.trace(o,s):this.traceObject(o)}},this._c2p=eP.createConverter(r.uriConverters?r.uriConverters.code2Protocol:void 0),this._p2c=tP.createConverter(r.uriConverters?r.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e?typeof e.delayOpenNotifications=="boolean"?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}:{delayOpenNotifications:!1}}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 visibleDocuments(){return this._visibleDocuments===void 0&&(this._visibleDocuments=new Df),this._visibleDocuments}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=re.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name,{log:!0}),this._traceOutputChannel===void 0&&(this._traceLogLevel=this._outputChannel.logLevel)),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 r=this.getPublicState();r!==t&&this._stateChangeEmitter.fire({oldState:t,newState:r})}getPublicState(){switch(this.$state){case de.Starting:return xi.Starting;case de.Running:return xi.Running;case de.StartFailed:return xi.StartFailed;default:return xi.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===de.StartFailed||this.$state===de.Stopping||this.$state===de.Stopped)return Promise.reject(new N.ResponseError(N.ErrorCodes.ConnectionInactive,"Client is not running"));let r=await this.$start();await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===N.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(r);let i,o;if(t.length===1?N.CancellationToken.is(t[0])?o=t[0]:i=t[0]:t.length===2&&(i=t[0],o=t[1]),o!==void 0&&o.isCancellationRequested)return Promise.reject(new N.ResponseError(N.LSPErrorCodes.RequestCancelled,"Request got cancelled"));let s=this._clientOptions.middleware?.sendRequest;return s!==void 0?s(e,i,o,(a,u,l)=>{let f=[];return u!==void 0&&f.push(u),l!==void 0&&f.push(l),r.sendRequest(a,...f)}):r.sendRequest(e,...t)}onRequest(e,t){let r=typeof e=="string"?e:e.method;this._requestHandlers.set(r,t);let i=this.activeConnection(),o;return i!==void 0?(this._requestDisposables.set(r,i.onRequest(e,t)),o={dispose:()=>{let s=this._requestDisposables.get(r);s!==void 0&&(s.dispose(),this._requestDisposables.delete(r))}}):(this._pendingRequestHandlers.set(r,t),o={dispose:()=>{this._pendingRequestHandlers.delete(r);let s=this._requestDisposables.get(r);s!==void 0&&(s.dispose(),this._requestDisposables.delete(r))}}),{dispose:()=>{this._requestHandlers.delete(r),o.dispose()}}}async sendNotification(e,t){if(this.$state===de.StartFailed||this.$state===de.Stopping||this.$state===de.Stopped)return Promise.reject(new N.ResponseError(N.ErrorCodes.ConnectionInactive,"Client is not running"));let r=this._didChangeTextDocumentFeature.syncKind===N.TextDocumentSyncKind.Full,i;r&&typeof e!="string"&&e.method===N.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._inFlightOpenNotifications.add(i));let o;typeof e!="string"&&e.method===N.DidCloseTextDocumentNotification.method&&(o=t.textDocument.uri);let s=await this.$start();if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(o))return;r&&await this.sendPendingFullTextDocumentChanges(s),i!==void 0&&this._inFlightOpenNotifications.delete(i);let u=this._clientOptions.middleware?.sendNotification;return u?u(e,s.sendNotification.bind(s),t):s.sendNotification(e,t)}onNotification(e,t){let r=typeof e=="string"?e:e.method;this._notificationHandlers.set(r,t);let i=this.activeConnection(),o;return i!==void 0?(this._notificationDisposables.set(r,i.onNotification(e,t)),o={dispose:()=>{let s=this._notificationDisposables.get(r);s!==void 0&&(s.dispose(),this._notificationDisposables.delete(r))}}):(this._pendingNotificationHandlers.set(r,t),o={dispose:()=>{this._pendingNotificationHandlers.delete(r);let s=this._notificationDisposables.get(r);s!==void 0&&(s.dispose(),this._notificationDisposables.delete(r))}}),{dispose:()=>{this._notificationHandlers.delete(r),o.dispose()}}}async sendProgress(e,t,r){if(this.$state===de.StartFailed||this.$state===de.Stopping||this.$state===de.Stopped)return Promise.reject(new N.ResponseError(N.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,r)}catch(i){throw this.error(`Sending progress for token ${t} failed.`,i),i}}onProgress(e,t,r){this._progressHandlers.set(t,{type:e,handler:r});let i=this.activeConnection(),o,s=this._clientOptions.middleware?.handleWorkDoneProgress,a=N.WorkDoneProgress.is(e)&&s!==void 0?u=>{s(t,u,()=>r(u))}:r;return i!==void 0?(this._progressDisposables.set(t,i.onProgress(e,t,a)),o={dispose:()=>{let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:r}),o={dispose:()=>{this._pendingProgressHandlers.delete(t);let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),o.dispose()}}}createDefaultErrorHandler(e){if(e!==void 0&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new wf(this,e??4)}async setTrace(e){this._trace=e;let t=this.activeConnection();t!==void 0&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof N.ResponseError){let t=e;return` Message: ${t.message}
|
|
15
|
+
Code: ${t.code} ${t.data?`
|
|
16
|
+
`+t.data.toString():""}`}return e instanceof Error?nn.string(e.stack)?e.stack:e.message:nn.string(e)?e:e.toString()}shouldLogToOutputChannel(){return this.$state!==de.Stopped?!0:this._outputChannel!==void 0}error(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.error(this.getLogMessage(e,t)),(r==="force"||r&&this._clientOptions.revealOutputChannelOn<=$r.Error)&&this.showNotificationMessage(N.MessageType.Error,e,t)}warn(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.warn(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=$r.Warn&&this.showNotificationMessage(N.MessageType.Warning,e,t)}info(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.info(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=$r.Info&&this.showNotificationMessage(N.MessageType.Info,e,t)}debug(e,t,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.debug(this.getLogMessage(e,t)),r&&this._clientOptions.revealOutputChannelOn<=$r.Debug&&this.showNotificationMessage(N.MessageType.Debug,e,t)}trace(e,t){this.traceOutputChannel.trace(this.getLogMessage(e,t))}traceObject(e){this.traceOutputChannel.trace(JSON.stringify(e))}showNotificationMessage(e,t,r){t=t??"A request has failed. See the output for more information.",r&&(t+=`
|
|
17
|
+
`+this.data2String(r)),(e===N.MessageType.Error?re.window.showErrorMessage:e===N.MessageType.Warning?re.window.showWarningMessage:re.window.showInformationMessage)(t,"Go to output").then(o=>{o!==void 0&&this.outputChannel.show(!0)})}getLogMessage(e,t){return t!=null?`${e}
|
|
18
|
+
${this.data2String(t)}`:e}needsStart(){return this.$state===de.Initial||this.$state===de.Stopping||this.$state===de.Stopped}needsStop(){return this.$state===de.Starting||this.$state===de.Running}activeConnection(){return this.$state===de.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===de.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===de.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,t,r]=this.createOnStartPromise();this._onStart=e,this._diagnostics===void 0&&(this._diagnostics=re.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName??this._id));for(let[i,o]of this._notificationHandlers)this._pendingNotificationHandlers.has(i)||this._pendingNotificationHandlers.set(i,o);for(let[i,o]of this._requestHandlers)this._pendingRequestHandlers.has(i)||this._pendingRequestHandlers.set(i,o);for(let[i,o]of this._progressHandlers)this._pendingProgressHandlers.has(i)||this._pendingProgressHandlers.set(i,o);this.$state=de.Starting;try{let i=await this.createConnection();i.onNotification(N.LogMessageNotification.type,o=>{switch(o.type){case N.MessageType.Error:this.error(o.message,void 0,!1);break;case N.MessageType.Warning:this.warn(o.message,void 0,!1);break;case N.MessageType.Info:this.info(o.message,void 0,!1);break;case N.MessageType.Debug:this.debug(o.message,void 0,!1);break;default:this.outputChannel.appendLine(o.message)}}),i.onNotification(N.ShowMessageNotification.type,o=>{switch(o.type){case N.MessageType.Error:re.window.showErrorMessage(o.message);break;case N.MessageType.Warning:re.window.showWarningMessage(o.message);break;case N.MessageType.Info:re.window.showInformationMessage(o.message);break;default:re.window.showInformationMessage(o.message)}}),i.onRequest(N.ShowMessageRequest.type,o=>{let s;switch(o.type){case N.MessageType.Error:s=re.window.showErrorMessage;break;case N.MessageType.Warning:s=re.window.showWarningMessage;break;case N.MessageType.Info:s=re.window.showInformationMessage;break;default:s=re.window.showInformationMessage}let a=o.actions||[];return s(o.message,...a)}),i.onNotification(N.TelemetryEventNotification.type,o=>{this._telemetryEmitter.fire(o)}),i.onRequest(N.ShowDocumentRequest.type,async(o,s)=>{let a=async l=>{let f=this.protocol2CodeConverter.asUri(l.uri);try{if(l.external===!0)return{success:await re.env.openExternal(f)};{let h={};return l.selection!==void 0&&(h.selection=this.protocol2CodeConverter.asRange(l.selection)),l.takeFocus===void 0||l.takeFocus===!1?h.preserveFocus=!0:l.takeFocus===!0&&(h.preserveFocus=!1),await re.window.showTextDocument(f,h),{success:!0}}}catch{return{success:!1}}},u=this._clientOptions.middleware.window?.showDocument;return u!==void 0?u(o,s,a):a(o)}),i.listen(),await this.initialize(i),t()}catch(i){this.$state=de.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,i,"force"),r(i)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise((i,o)=>{e=i,t=o}),e,t]}async initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,[r,i]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],o={processId:null,clientInfo:{name:re.env.appName,version:re.version},locale:this.getLocale(),rootPath:r||null,rootUri:r?this._c2p.asUri(re.Uri.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:nn.func(t)?t():t,trace:N.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(o),this._clientOptions.progressOnInitialization){let s=Yy.generateUuid(),a=new nP.ProgressPart(e,s);o.workDoneToken=s;try{let u=await this.doInitialize(e,o);return a.done(),u}catch(u){throw a.cancel(),u}}else return this.doInitialize(e,o)}async doInitialize(e,t){try{let r=await e.initialize(t);if(r.capabilities.positionEncoding!==void 0&&r.capabilities.positionEncoding!==N.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${r.capabilities.positionEncoding}) received from server ${this.name}`);this._initializeResult=r,this.$state=de.Running;let i;nn.number(r.capabilities.textDocumentSync)?r.capabilities.textDocumentSync===N.TextDocumentSyncKind.None?i={openClose:!1,change:N.TextDocumentSyncKind.None,save:void 0}:i={openClose:!0,change:r.capabilities.textDocumentSync,save:{includeText:!1}}:r.capabilities.textDocumentSync!==void 0&&r.capabilities.textDocumentSync!==null&&(i=r.capabilities.textDocumentSync),this._capabilities=Object.assign({},r.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(N.PublishDiagnosticsNotification.type,o=>this.handleDiagnostics(o)),e.onRequest(N.RegistrationRequest.type,o=>this.handleRegistrationRequest(o)),e.onRequest("client/registerFeature",o=>this.handleRegistrationRequest(o)),e.onRequest(N.UnregistrationRequest.type,o=>this.handleUnregistrationRequest(o)),e.onRequest("client/unregisterFeature",o=>this.handleUnregistrationRequest(o)),e.onRequest(N.ApplyWorkspaceEditRequest.type,o=>this.handleApplyWorkspaceEdit(o));for(let[o,s]of this._pendingNotificationHandlers)this._notificationDisposables.set(o,e.onNotification(o,s));this._pendingNotificationHandlers.clear();for(let[o,s]of this._pendingRequestHandlers)this._requestDisposables.set(o,e.onRequest(o,s));this._pendingRequestHandlers.clear();for(let[o,s]of this._pendingProgressHandlers)this._progressDisposables.set(o,e.onProgress(s.type,o,s.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(N.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookLogLevelChanged(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),r}catch(r){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(r)?this.initialize(e):this.stop():r instanceof N.ResponseError&&r.data&&r.data.retry?re.window.showErrorMessage(r.message,{title:"Retry",id:"retry"}).then(i=>{i&&i.id==="retry"?this.initialize(e):this.stop()}):(r&&r.message&&re.window.showErrorMessage(r.message),this.error("Server initialization failed.",r),this.stop()),r}}_clientGetRootPath(){let e=re.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}stop(e=2e3){return this.shutdown(Dr.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t=2e3){if(this.$state===de.Stopped||this.$state===de.Initial)return;if(this.$state===de.Stopping){if(this._onStop!==void 0)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}let r=this.activeConnection();if(r===void 0||this.$state!==de.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=de.Stopping,this.cleanUp(e);let i=new Promise(s=>{(0,N.RAL)().timer.setTimeout(s,t)}),o=(async s=>(await s.shutdown(),await s.exit(),s))(r);return this._onStop=Promise.race([i,o]).then(s=>{if(s!==void 0)s.end(),s.dispose();else throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out")},s=>{throw this.error("Stopping server failed",s,!1),s}).finally(()=>{this.$state=de.Stopped,e===Dr.Stop&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()})}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();let t=this._listeners.splice(0,this._listeners.length);for(let r of t)r.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(let r of Array.from(this._features.entries()).map(i=>i[1]).reverse())r.clear();(e===Dr.Stop||e===Dr.Restart)&&this._diagnostics!==void 0&&(this._diagnostics.dispose(),this._diagnostics=void 0),this._idleInterval!==void 0&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){this._outputChannel!==void 0&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){let t=this;async function r(o){return t._fileEvents.push(o),t._fileEventDelayer.trigger(async()=>{let s=t._fileEvents;t._fileEvents=[];try{await t.sendNotification(N.DidChangeWatchedFilesNotification.type,{changes:s})}catch(a){throw t._fileEvents.push(...s),a}})}let i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,r):r(e)).catch(o=>{t.error("Notifying file events failed.",o)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{let t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(t.length===0)return;for(let r of t){let i=this.code2ProtocolConverter.asChangeTextDocumentParams(r);await e.sendNotification(N.DidChangeTextDocumentNotification.type,i),this._didChangeTextDocumentFeature.notificationSent(r,N.DidChangeTextDocumentNotification.type,i)}}catch(t){throw this.error("Sending pending changes failed",t,!1),t}})}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger(async()=>{let e=this.activeConnection();if(e===void 0){this.triggerPendingChangeDelivery();return}await this.sendPendingFullTextDocumentChanges(e)}).catch(e=>this.error("Delivering pending changes failed",e,!1))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};handleDiagnostics(e){if(!this._diagnostics)return;let t=e.uri;this._diagnosticQueueState.state==="busy"&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,N.RAL)().timer.setImmediate(()=>{this.workDiagnosticQueue()})}workDiagnosticQueue(){if(this._diagnosticQueueState.state==="busy")return;let e=this._diagnosticQueue.entries().next();if(e.done===!0)return;let[t,r]=e.value;this._diagnosticQueue.delete(t);let i=new re.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(r,i.token).then(o=>{if(!i.token.isCancellationRequested){let s=this._p2c.asUri(t),a=this.clientOptions.middleware;a.handleDiagnostics?a.handleDiagnostics(s,o,(u,l)=>this.setDiagnostics(u,l)):this.setDiagnostics(s,o)}}).catch(o=>{this.error("Processing diagnostic queue failed.",o)}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return re.env.language}async $start(){if(this.$state===de.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();let e=this.activeConnection();if(e===void 0)throw new Error("Starting server failed");return e}async createConnection(){let e=(i,o,s)=>{this.handleConnectionError(i,o,s).catch(a=>this.error("Handling connection error failed",a))},t=()=>{this.handleConnectionClosed().catch(i=>this.error("Handling connection close failed",i))},r=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=FP(r.reader,r.writer,e,t,this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===de.Stopped)return;try{this._connection!==void 0&&this._connection.dispose()}catch{}let e={action:Sr.DoNotRestart};if(this.$state!==de.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch{}this._connection=void 0,e.action===Sr.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,e.handled===!0?!1:"force"),this.cleanUp(Dr.Stop),this.$state===de.Starting?this.$state=de.StartFailed:this.$state=de.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Sr.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(Dr.Restart),this.$state=de.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch(t=>this.error("Restarting server failed",t,"force")))}async handleConnectionError(e,t,r){let i=await this._clientOptions.errorHandler.error(e,t,r);i.action===Do.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring.
|
|
19
|
+
${e.message}
|
|
20
|
+
Shutting down server.`,void 0,i.handled===!0?!1:"force"),this.stop().catch(o=>{this.error("Stopping server failed",o,!1)})):this.error(i.message??`Client ${this._name}: connection to server is erroring.
|
|
21
|
+
${e.message}`,void 0,i.handled===!0?!1:"force")}hookConfigurationChanged(e){this._listeners.push(re.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)}))}hookLogLevelChanged(e){this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel(t=>{this._traceLogLevel=t,this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let r=re.workspace.getConfiguration(this._id),i=this._traceLogLevel!==re.LogLevel.Trace?N.Trace.Off:N.Trace.Messages,o=N.TraceFormat.Text;if(r&&i!==N.Trace.Off){let s=r.get("trace.server","messages");typeof s=="string"?(i=N.Trace.fromString(s),i===N.Trace.Off&&(i=N.Trace.Messages)):(i=N.Trace.fromString(r.get("trace.server.verbosity","messages")),i===N.Trace.Off&&(i=N.Trace.Messages),o=N.TraceFormat.fromString(r.get("trace.server.format","text")))}this._trace=i,this._traceFormat=o,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch(s=>{this.error("Updating trace failed with error",s,!1)})}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let r;nn.array(t)?r=t:r=[t],r&&this._dynamicFeatures.get(N.DidChangeWatchedFilesNotification.type.method).registerRaw(Yy.generateUuid(),r)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),Nt.DynamicFeature.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){let t=this.getFeature(N.NotebookDocumentSyncRegistrationType.method);return t===void 0||!(t instanceof bf.NotebookDocumentSyncFeature)?!1:t.handles(e)}registerBuiltinFeatures(){let e=new Map;this.registerFeature(new ev.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new Oi.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new Oi.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new Oi.WillSaveFeature(this)),this.registerFeature(new Oi.WillSaveWaitUntilFeature(this)),this.registerFeature(new Oi.DidSaveTextDocumentFeature(this)),this.registerFeature(new Oi.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new EP.FileSystemWatcherFeature(this,t=>this.notifyFileEvent(t))),this.registerFeature(new iP.CompletionItemFeature(this)),this.registerFeature(new oP.HoverFeature(this)),this.registerFeature(new aP.SignatureHelpFeature(this)),this.registerFeature(new sP.DefinitionFeature(this)),this.registerFeature(new dP.ReferencesFeature(this)),this.registerFeature(new cP.DocumentHighlightFeature(this)),this.registerFeature(new uP.DocumentSymbolFeature(this)),this.registerFeature(new lP.WorkspaceSymbolFeature(this)),this.registerFeature(new gP.CodeActionFeature(this)),this.registerFeature(new mP.CodeLensFeature(this)),this.registerFeature(new _f.DocumentFormattingFeature(this)),this.registerFeature(new _f.DocumentRangeFormattingFeature(this)),this.registerFeature(new _f.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new yP.RenameFeature(this)),this.registerFeature(new vP.DocumentLinkFeature(this)),this.registerFeature(new _P.ExecuteCommandFeature(this)),this.registerFeature(new ev.SyncConfigurationFeature(this)),this.registerFeature(new fP.TypeDefinitionFeature(this)),this.registerFeature(new hP.ImplementationFeature(this)),this.registerFeature(new pP.ColorProviderFeature(this)),this.clientOptions.workspaceFolder===void 0&&this.registerFeature(new qP.WorkspaceFoldersFeature(this)),this.registerFeature(new bP.FoldingRangeFeature(this)),this.registerFeature(new CP.DeclarationFeature(this)),this.registerFeature(new wP.SelectionRangeFeature(this)),this.registerFeature(new jP.ProgressFeature(this)),this.registerFeature(new DP.CallHierarchyFeature(this)),this.registerFeature(new SP.SemanticTokensFeature(this)),this.registerFeature(new PP.LinkedEditingFeature(this)),this.registerFeature(new qi.DidCreateFilesFeature(this)),this.registerFeature(new qi.DidRenameFilesFeature(this)),this.registerFeature(new qi.DidDeleteFilesFeature(this)),this.registerFeature(new qi.WillCreateFilesFeature(this)),this.registerFeature(new qi.WillRenameFilesFeature(this)),this.registerFeature(new qi.WillDeleteFilesFeature(this)),this.registerFeature(new RP.TypeHierarchyFeature(this)),this.registerFeature(new TP.InlineValueFeature(this)),this.registerFeature(new OP.InlayHintsFeature(this)),this.registerFeature(new rP.DiagnosticFeature(this)),this.registerFeature(new bf.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(Rf.createAll(this))}fillInitializeParams(e){for(let t of this._features)nn.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};(0,Nt.ensure)(e,"workspace").applyEdit=!0;let t=(0,Nt.ensure)((0,Nt.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[N.ResourceOperationKind.Create,N.ResourceOperationKind.Rename,N.ResourceOperationKind.Delete],t.failureHandling=N.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0},t.metadataSupport=!0,t.snippetEditSupport=!0;let r=(0,Nt.ensure)((0,Nt.ensure)(e,"textDocument"),"publishDiagnostics");r.relatedInformation=!0,r.versionSupport=!1,r.tagSupport={valueSet:[N.DiagnosticTag.Unnecessary,N.DiagnosticTag.Deprecated]},r.codeDescriptionSupport=!0,r.dataSupport=!0;let i=(0,Nt.ensure)((0,Nt.ensure)(e,"textDocument"),"filters");i.relativePatternSupport=!0;let o=(0,Nt.ensure)(e,"window"),s=(0,Nt.ensure)(o,"showMessage");s.messageActionItem={additionalPropertiesSupport:!0};let a=(0,Nt.ensure)(o,"showDocument");a.support=!0;let u=(0,Nt.ensure)(e,"general");u.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(n.RequestsToCancelOnContentModified)},u.regularExpressions={engine:"ECMAScript",version:"ES2020"},u.markdown={parser:"marked",version:"1.1.0"},u.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(u.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 l of this._features)l.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let r of this._features)nn.func(r.preInitialize)&&r.preInitialize(this._capabilities,t);for(let r of this._features)r.initialize(this._capabilities,t)}async handleRegistrationRequest(e){let t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,r=>this.doRegisterCapability(r)):this.doRegisterCapability(e)}async doRegisterCapability(e){if(!this.isRunning()){for(let t of e.registrations)this._ignoredRegistrations.add(t.id);return}for(let t of e.registrations){let r=this._dynamicFeatures.get(t.method);if(r===void 0)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));let i=t.registerOptions??{};i.documentSelector=i.documentSelector??this._clientOptions.documentSelector;let o={id:t.id,registerOptions:i};try{r.register(o)}catch(s){return Promise.reject(s)}}}async handleUnregistrationRequest(e){let t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,r=>this.doUnregisterCapability(r)):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;let r=this._dynamicFeatures.get(t.method);if(!r)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));r.unregister(t.id)}}async handleApplyWorkspaceEdit(e){let t=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(t){let r=await t(e,i=>this.doHandleApplyWorkspaceEdit(i));return r instanceof N.ResponseError?Promise.reject(r):r}else return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new ea.Semaphore(1);async doHandleApplyWorkspaceEdit(e){let t=e.edit,r=await this.workspaceEditLock.lock(()=>this._p2c.asWorkspaceEdit(t)),i=new Map;re.workspace.textDocuments.forEach(s=>i.set(s.uri.toString(),s));let o=!1;if(t.documentChanges){for(let s of t.documentChanges)if(N.TextDocumentEdit.is(s)&&s.textDocument.version&&s.textDocument.version>=0){let a=this._p2c.asUri(s.textDocument.uri).toString(),u=i.get(a);if(u&&u.version!==s.textDocument.version){o=!0;break}}}return o?Promise.resolve({applied:!1}):nn.asPromise(re.workspace.applyEdit(r,{isRefactoring:e.metadata?.isRefactoring}).then(s=>({applied:s})))}static RequestsToCancelOnContentModified=new Set([N.SemanticTokensRequest.method,N.SemanticTokensRangeRequest.method,N.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([N.CompletionResolveRequest.method,N.CodeLensResolveRequest.method,N.CodeActionResolveRequest.method,N.InlayHintResolveRequest.method,N.DocumentLinkResolveRequest.method,N.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,t,r,i,o=!0,s=!1){if(r instanceof N.ResponseError){if(r.code===N.ErrorCodes.PendingResponseRejected||r.code===N.ErrorCodes.ConnectionInactive)return i;if(r.code===N.LSPErrorCodes.RequestCancelled||r.code===N.LSPErrorCodes.ServerCancelled){if(t!==void 0&&t.isCancellationRequested&&!s)return i;throw r.data!==void 0?new Nt.LSPCancellationError(r.data):new re.CancellationError}else if(r.code===N.LSPErrorCodes.ContentModified){if(n.RequestsToCancelOnContentModified.has(e.method)||n.CancellableResolveCalls.has(e.method))throw new re.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,r,o),r}};Pe.BaseLanguageClient=ta;var Sf=class extends ta{serverOptions;constructor(e,t,r,i){super(e,t,i),this.serverOptions=r}async createMessageTransports(e){return this.serverOptions()}};Pe.LanguageClient=Sf;var Pf=class{error(e){(0,N.RAL)().console.error(e)}warn(e){(0,N.RAL)().console.warn(e)}info(e){(0,N.RAL)().console.info(e)}log(e){(0,N.RAL)().console.log(e)}};function FP(n,e,t,r,i){let o=new Pf,s=(0,N.createProtocolConnection)(n,e,o,i);return s.onError(u=>{t(u[0],u[1],u[2])}),s.onClose(r),{listen:()=>s.listen(),sendRequest:s.sendRequest,onRequest:s.onRequest,hasPendingResponse:s.hasPendingResponse,sendNotification:s.sendNotification,onNotification:s.onNotification,onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(u,l,f)=>{let h={sendNotification:!1,traceFormat:N.TraceFormat.Text};return f===void 0?s.trace(u,l,h):(nn.boolean(f),s.trace(u,l,f))},initialize:u=>s.sendRequest(N.InitializeRequest.type,u),shutdown:()=>s.sendRequest(N.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(N.ExitNotification.type),end:()=>s.end(),dispose:()=>s.dispose()}}var Rf;(function(n){function e(t){return[new xP.InlineCompletionItemFeature(t),new MP.TextDocumentContentFeature(t)]}n.createAll=e})(Rf||(Pe.ProposedFeatures=Rf={}))});var So=F(kt=>{"use strict";y();var IP=kt&&kt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Tf=kt&&kt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&IP(e,n,t)};Object.defineProperty(kt,"__esModule",{value:!0});kt.DiagnosticPullMode=kt.vsdiag=void 0;Tf(oe(),kt);Tf(ge(),kt);var iv=gl();Object.defineProperty(kt,"vsdiag",{enumerable:!0,get:function(){return iv.vsdiag}});Object.defineProperty(kt,"DiagnosticPullMode",{enumerable:!0,get:function(){return iv.DiagnosticPullMode}});Tf(rv(),kt)});var gv=F(zr=>{"use strict";y();Object.defineProperty(zr,"__esModule",{value:!0});zr.PromiseImpl=zr.QueueMicrotaskImpl=void 0;var On=kn(),qf=class n extends On.AbstractMessageBuffer{static emptyBuffer=new Uint8Array(0);asciiDecoder;constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return n.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t==="ascii"?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}},xf=class{socket;_onData;_messageListener;constructor(e){this.socket=e,this._onData=new On.Emitter,this._messageListener=t=>{t.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,On.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),On.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),On.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),On.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},Mf=class{socket;constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),On.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),On.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),On.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if(typeof e=="string"){if(t!==void 0&&t!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},ia=class{isDisposed;constructor(e,...t){this.isDisposed=!1,queueMicrotask(()=>{this.isDisposed||e(...t)})}dispose(){this.isDisposed=!0}};zr.QueueMicrotaskImpl=ia;var oa=class{isDisposed;constructor(e,...t){this.isDisposed=!1,Promise.resolve().then(()=>{this.isDisposed||e(...t)},()=>{})}dispose(){this.isDisposed=!0}};zr.PromiseImpl=oa;var kP=new TextEncoder,pv=Object.freeze({messageBuffer:Object.freeze({create:n=>new qf(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{if(e.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(kP.encode(JSON.stringify(n,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{if(!(n instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(n)))}})}),stream:Object.freeze({asReadableStream:n=>new xf(n),asWritableStream:n=>new Mf(n)}),console,timer:Object.freeze({setTimeout(n,e,...t){let r=setTimeout(n,e,...t);return{dispose:()=>clearTimeout(r)}},setImmediate(n,...e){if(typeof globalThis.queueMicrotask=="function")return new ia(n,...e);if(Promise!==void 0)return new oa(n,...e);{let t=setTimeout(n,0,...e);return{dispose:()=>clearTimeout(t)}}},setInterval(n,e,...t){let r=setInterval(n,e,...t);return{dispose:()=>clearInterval(r)}}})});function Ef(){return pv}(function(n){function e(){On.RAL.install(pv)}n.install=e})(Ef||(Ef={}));zr.default=Ef});var If=F(Tt=>{"use strict";y();var AP=Tt&&Tt.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),LP=Tt&&Tt.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&AP(e,n,t)},HP=Tt&&Tt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.BrowserMessageWriter=Tt.BrowserMessageReader=void 0;Tt.createMessageConnection=WP;var UP=HP(gv());UP.default.install();var Mi=kn();LP(kn(),Tt);var jf=class extends Mi.AbstractMessageReader{_onData;_messageListener;constructor(e){super(),this._onData=new Mi.Emitter,this._messageListener=t=>{this._onData.fire(t.data)},e.addEventListener("error",t=>this.fireError(t)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}};Tt.BrowserMessageReader=jf;var Ff=class extends Mi.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",t=>this.fireError(t))}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(){}};Tt.BrowserMessageWriter=Ff;function WP(n,e,t,r){return t===void 0&&(t=Mi.NullLogger),Mi.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Mi.createMessageConnection)(n,e,t,r)}});var Nf=F(er=>{"use strict";y();var $P=er&&er.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),mv=er&&er.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&$P(e,n,t)};Object.defineProperty(er,"__esModule",{value:!0});er.createProtocolConnection=KP;var zP=If();mv(If(),er);mv(oe(),er);function KP(n,e,t,r){return(0,zP.createMessageConnection)(n,e,t,r)}});var _v=F(qn=>{"use strict";y();var BP=qn&&qn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),vv=qn&&qn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&BP(e,n,t)};Object.defineProperty(qn,"__esModule",{value:!0});qn.LanguageClient=void 0;var VP=So(),yv=Nf();vv(Nf(),qn);vv(So(),qn);var kf=class extends VP.BaseLanguageClient{serverOptions;constructor(e,t,r,i){super(e,t,i),this.serverOptions=r}async createMessageTransports(e){if(typeof this.serverOptions=="function"){let t=await this.serverOptions();return t instanceof Worker?this.createMessageTransportsFromWorker(t):t}else return this.createMessageTransportsFromWorker(this.serverOptions)}createMessageTransportsFromWorker(e){let t=new yv.BrowserMessageReader(e),r=new yv.BrowserMessageWriter(e);return Promise.resolve({reader:t,writer:r})}};qn.LanguageClient=kf});var wv=F((Nx,Cv)=>{"use strict";y();function xn(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function bv(n,e){for(var t="",r=0,i=-1,o=0,s,a=0;a<=n.length;++a){if(a<n.length)s=n.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(t.length<2||r!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var u=t.lastIndexOf("/");if(u!==t.length-1){u===-1?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=a,o=0;continue}}else if(t.length===2||t.length===1){t="",r=0,i=a,o=0;continue}}e&&(t.length>0?t+="/..":t="..",r=2)}else t.length>0?t+="/"+n.slice(i+1,a):t=n.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return t}function GP(n,e){var t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+r:t+n+r:r}var Ei={resolve:function(){for(var e="",t=!1,r,i=arguments.length-1;i>=-1&&!t;i--){var o;i>=0?o=arguments[i]:(r===void 0&&(r=process.cwd()),o=r),xn(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=bv(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(xn(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=bv(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return xn(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];xn(r),r.length>0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":Ei.normalize(e)},relative:function(e,t){if(xn(e),xn(t),e===t||(e=Ei.resolve(e),t=Ei.resolve(t),e===t))return"";for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var a=t.length,u=a-s,l=o<u?o:u,f=-1,h=0;h<=l;++h){if(h===l){if(u>l){if(t.charCodeAt(s+h)===47)return t.slice(s+h+1);if(h===0)return t.slice(s+h)}else o>l&&(e.charCodeAt(r+h)===47?f=h:h===0&&(f=0));break}var p=e.charCodeAt(r+h),m=t.charCodeAt(s+h);if(p!==m)break;p===47&&(f=h)}var b="";for(h=r+f+1;h<=i;++h)(h===i||e.charCodeAt(h)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+t.slice(s+f):(s+=f,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(xn(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,i=-1,o=!0,s=e.length-1;s>=1;--s)if(t=e.charCodeAt(s),t===47){if(!o){i=s;break}}else o=!1;return i===-1?r?"/":".":r&&i===1?"//":e.slice(0,i)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xn(e);var r=0,i=-1,o=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,u=-1;for(s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(l===47){if(!o){r=s+1;break}}else u===-1&&(o=!1,u=s+1),a>=0&&(l===t.charCodeAt(a)?--a===-1&&(i=s):(a=-1,i=u))}return r===i?i=u:i===-1&&(i=e.length),e.slice(r,i)}else{for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===47){if(!o){r=s+1;break}}else i===-1&&(o=!1,i=s+1);return i===-1?"":e.slice(r,i)}},extname:function(e){xn(e);for(var t=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var u=e.charCodeAt(a);if(u===47){if(!o){r=a+1;break}continue}i===-1&&(o=!1,i=a+1),u===46?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||i===-1||s===0||s===1&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return GP("/",e)},parse:function(e){xn(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),i=r===47,o;i?(t.root="/",o=1):o=0;for(var s=-1,a=0,u=-1,l=!0,f=e.length-1,h=0;f>=o;--f){if(r=e.charCodeAt(f),r===47){if(!l){a=f+1;break}continue}u===-1&&(l=!1,u=f+1),r===46?s===-1?s=f:h!==1&&(h=1):s!==-1&&(h=-1)}return s===-1||u===-1||h===0||h===1&&s===u-1&&s===a+1?u!==-1&&(a===0&&i?t.base=t.name=e.slice(1,u):t.base=t.name=e.slice(a,u)):(a===0&&i?(t.name=e.slice(1,s),t.base=e.slice(1,u)):(t.name=e.slice(a,s),t.base=e.slice(a,u)),t.ext=e.slice(s,u)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Ei.posix=Ei;Cv.exports=Ei});var nR={};Vf(nR,{activate:()=>eR,deactivate:()=>tR});module.exports=Mo(nR);y();var ua=require("vscode");y();var fe=require("vscode"),Ro=Or(So());y();var rn=require("vscode");y();var ov;(()=>{"use strict";var n={975:H=>{function R(P){if(typeof P!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(P))}function V(P,M){for(var I,z="",W=0,B=-1,ne=0,se=0;se<=P.length;++se){if(se<P.length)I=P.charCodeAt(se);else{if(I===47)break;I=47}if(I===47){if(!(B===se-1||ne===1))if(B!==se-1&&ne===2){if(z.length<2||W!==2||z.charCodeAt(z.length-1)!==46||z.charCodeAt(z.length-2)!==46){if(z.length>2){var Ae=z.lastIndexOf("/");if(Ae!==z.length-1){Ae===-1?(z="",W=0):W=(z=z.slice(0,Ae)).length-1-z.lastIndexOf("/"),B=se,ne=0;continue}}else if(z.length===2||z.length===1){z="",W=0,B=se,ne=0;continue}}M&&(z.length>0?z+="/..":z="..",W=2)}else z.length>0?z+="/"+P.slice(B+1,se):z=P.slice(B+1,se),W=se-B-1;B=se,ne=0}else I===46&&ne!==-1?++ne:ne=-1}return z}var K={resolve:function(){for(var P,M="",I=!1,z=arguments.length-1;z>=-1&&!I;z--){var W;z>=0?W=arguments[z]:(P===void 0&&(P=process.cwd()),W=P),R(W),W.length!==0&&(M=W+"/"+M,I=W.charCodeAt(0)===47)}return M=V(M,!I),I?M.length>0?"/"+M:"/":M.length>0?M:"."},normalize:function(P){if(R(P),P.length===0)return".";var M=P.charCodeAt(0)===47,I=P.charCodeAt(P.length-1)===47;return(P=V(P,!M)).length!==0||M||(P="."),P.length>0&&I&&(P+="/"),M?"/"+P:P},isAbsolute:function(P){return R(P),P.length>0&&P.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var P,M=0;M<arguments.length;++M){var I=arguments[M];R(I),I.length>0&&(P===void 0?P=I:P+="/"+I)}return P===void 0?".":K.normalize(P)},relative:function(P,M){if(R(P),R(M),P===M||(P=K.resolve(P))===(M=K.resolve(M)))return"";for(var I=1;I<P.length&&P.charCodeAt(I)===47;++I);for(var z=P.length,W=z-I,B=1;B<M.length&&M.charCodeAt(B)===47;++B);for(var ne=M.length-B,se=W<ne?W:ne,Ae=-1,me=0;me<=se;++me){if(me===se){if(ne>se){if(M.charCodeAt(B+me)===47)return M.slice(B+me+1);if(me===0)return M.slice(B+me)}else W>se&&(P.charCodeAt(I+me)===47?Ae=me:me===0&&(Ae=0));break}var Ye=P.charCodeAt(I+me);if(Ye!==M.charCodeAt(B+me))break;Ye===47&&(Ae=me)}var qt="";for(me=I+Ae+1;me<=z;++me)me!==z&&P.charCodeAt(me)!==47||(qt.length===0?qt+="..":qt+="/..");return qt.length>0?qt+M.slice(B+Ae):(B+=Ae,M.charCodeAt(B)===47&&++B,M.slice(B))},_makeLong:function(P){return P},dirname:function(P){if(R(P),P.length===0)return".";for(var M=P.charCodeAt(0),I=M===47,z=-1,W=!0,B=P.length-1;B>=1;--B)if((M=P.charCodeAt(B))===47){if(!W){z=B;break}}else W=!1;return z===-1?I?"/":".":I&&z===1?"//":P.slice(0,z)},basename:function(P,M){if(M!==void 0&&typeof M!="string")throw new TypeError('"ext" argument must be a string');R(P);var I,z=0,W=-1,B=!0;if(M!==void 0&&M.length>0&&M.length<=P.length){if(M.length===P.length&&M===P)return"";var ne=M.length-1,se=-1;for(I=P.length-1;I>=0;--I){var Ae=P.charCodeAt(I);if(Ae===47){if(!B){z=I+1;break}}else se===-1&&(B=!1,se=I+1),ne>=0&&(Ae===M.charCodeAt(ne)?--ne==-1&&(W=I):(ne=-1,W=se))}return z===W?W=se:W===-1&&(W=P.length),P.slice(z,W)}for(I=P.length-1;I>=0;--I)if(P.charCodeAt(I)===47){if(!B){z=I+1;break}}else W===-1&&(B=!1,W=I+1);return W===-1?"":P.slice(z,W)},extname:function(P){R(P);for(var M=-1,I=0,z=-1,W=!0,B=0,ne=P.length-1;ne>=0;--ne){var se=P.charCodeAt(ne);if(se!==47)z===-1&&(W=!1,z=ne+1),se===46?M===-1?M=ne:B!==1&&(B=1):M!==-1&&(B=-1);else if(!W){I=ne+1;break}}return M===-1||z===-1||B===0||B===1&&M===z-1&&M===I+1?"":P.slice(M,z)},format:function(P){if(P===null||typeof P!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof P);return(function(M,I){var z=I.dir||I.root,W=I.base||(I.name||"")+(I.ext||"");return z?z===I.root?z+W:z+"/"+W:W})(0,P)},parse:function(P){R(P);var M={root:"",dir:"",base:"",ext:"",name:""};if(P.length===0)return M;var I,z=P.charCodeAt(0),W=z===47;W?(M.root="/",I=1):I=0;for(var B=-1,ne=0,se=-1,Ae=!0,me=P.length-1,Ye=0;me>=I;--me)if((z=P.charCodeAt(me))!==47)se===-1&&(Ae=!1,se=me+1),z===46?B===-1?B=me:Ye!==1&&(Ye=1):B!==-1&&(Ye=-1);else if(!Ae){ne=me+1;break}return B===-1||se===-1||Ye===0||Ye===1&&B===se-1&&B===ne+1?se!==-1&&(M.base=M.name=ne===0&&W?P.slice(1,se):P.slice(ne,se)):(ne===0&&W?(M.name=P.slice(1,B),M.base=P.slice(1,se)):(M.name=P.slice(ne,B),M.base=P.slice(ne,se)),M.ext=P.slice(B,se)),ne>0?M.dir=P.slice(0,ne-1):W&&(M.dir="/"),M},sep:"/",delimiter:":",win32:null,posix:null};K.posix=K,H.exports=K}},e={};function t(H){var R=e[H];if(R!==void 0)return R.exports;var V=e[H]={exports:{}};return n[H](V,V.exports,t),V.exports}t.d=(H,R)=>{for(var V in R)t.o(R,V)&&!t.o(H,V)&&Object.defineProperty(H,V,{enumerable:!0,get:R[V]})},t.o=(H,R)=>Object.prototype.hasOwnProperty.call(H,R),t.r=H=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(H,"__esModule",{value:!0})};var r={};let i;t.r(r),t.d(r,{URI:()=>p,Utils:()=>on}),typeof process=="object"?i=!1:typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function u(H,R){if(!H.scheme&&R)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${H.authority}", path: "${H.path}", query: "${H.query}", fragment: "${H.fragment}"}`);if(H.scheme&&!o.test(H.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(H.path){if(H.authority){if(!s.test(H.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(H.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let l="",f="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(R){return R instanceof p||!!R&&typeof R.authority=="string"&&typeof R.fragment=="string"&&typeof R.path=="string"&&typeof R.query=="string"&&typeof R.scheme=="string"&&typeof R.fsPath=="string"&&typeof R.with=="function"&&typeof R.toString=="function"}scheme;authority;path;query;fragment;constructor(R,V,K,P,M,I=!1){typeof R=="object"?(this.scheme=R.scheme||l,this.authority=R.authority||l,this.path=R.path||l,this.query=R.query||l,this.fragment=R.fragment||l):(this.scheme=(function(z,W){return z||W?z:"file"})(R,I),this.authority=V||l,this.path=(function(z,W){switch(z){case"https":case"http":case"file":W?W[0]!==f&&(W=f+W):W=f}return W})(this.scheme,K||l),this.query=P||l,this.fragment=M||l,u(this,I))}get fsPath(){return E(this,!1)}with(R){if(!R)return this;let{scheme:V,authority:K,path:P,query:M,fragment:I}=R;return V===void 0?V=this.scheme:V===null&&(V=l),K===void 0?K=this.authority:K===null&&(K=l),P===void 0?P=this.path:P===null&&(P=l),M===void 0?M=this.query:M===null&&(M=l),I===void 0?I=this.fragment:I===null&&(I=l),V===this.scheme&&K===this.authority&&P===this.path&&M===this.query&&I===this.fragment?this:new b(V,K,P,M,I)}static parse(R,V=!1){let K=h.exec(R);return K?new b(K[2]||l,le(K[4]||l),le(K[5]||l),le(K[7]||l),le(K[9]||l),V):new b(l,l,l,l,l)}static file(R){let V=l;if(i&&(R=R.replace(/\\/g,f)),R[0]===f&&R[1]===f){let K=R.indexOf(f,2);K===-1?(V=R.substring(2),R=f):(V=R.substring(2,K),R=R.substring(K)||f)}return new b("file",V,R,l,l)}static from(R){let V=new b(R.scheme,R.authority,R.path,R.query,R.fragment);return u(V,!0),V}toString(R=!1){return L(this,R)}toJSON(){return this}static revive(R){if(R){if(R instanceof p)return R;{let V=new b(R);return V._formatted=R.external,V._fsPath=R._sep===m?R.fsPath:null,V}}return R}}let m=i?1:void 0;class b extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=E(this,!1)),this._fsPath}toString(R=!1){return R?L(this,!0):(this._formatted||(this._formatted=L(this,!1)),this._formatted)}toJSON(){let R={$mid:1};return this._fsPath&&(R.fsPath=this._fsPath,R._sep=m),this._formatted&&(R.external=this._formatted),this.path&&(R.path=this.path),this.scheme&&(R.scheme=this.scheme),this.authority&&(R.authority=this.authority),this.query&&(R.query=this.query),this.fragment&&(R.fragment=this.fragment),R}}let C={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function j(H,R,V){let K,P=-1;for(let M=0;M<H.length;M++){let I=H.charCodeAt(M);if(I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===45||I===46||I===95||I===126||R&&I===47||V&&I===91||V&&I===93||V&&I===58)P!==-1&&(K+=encodeURIComponent(H.substring(P,M)),P=-1),K!==void 0&&(K+=H.charAt(M));else{K===void 0&&(K=H.substr(0,M));let z=C[I];z!==void 0?(P!==-1&&(K+=encodeURIComponent(H.substring(P,M)),P=-1),K+=z):P===-1&&(P=M)}}return P!==-1&&(K+=encodeURIComponent(H.substring(P))),K!==void 0?K:H}function U(H){let R;for(let V=0;V<H.length;V++){let K=H.charCodeAt(V);K===35||K===63?(R===void 0&&(R=H.substr(0,V)),R+=C[K]):R!==void 0&&(R+=H[V])}return R!==void 0?R:H}function E(H,R){let V;return V=H.authority&&H.path.length>1&&H.scheme==="file"?`//${H.authority}${H.path}`:H.path.charCodeAt(0)===47&&(H.path.charCodeAt(1)>=65&&H.path.charCodeAt(1)<=90||H.path.charCodeAt(1)>=97&&H.path.charCodeAt(1)<=122)&&H.path.charCodeAt(2)===58?R?H.path.substr(1):H.path[1].toLowerCase()+H.path.substr(2):H.path,i&&(V=V.replace(/\//g,"\\")),V}function L(H,R){let V=R?U:j,K="",{scheme:P,authority:M,path:I,query:z,fragment:W}=H;if(P&&(K+=P,K+=":"),(M||P==="file")&&(K+=f,K+=f),M){let B=M.indexOf("@");if(B!==-1){let ne=M.substr(0,B);M=M.substr(B+1),B=ne.lastIndexOf(":"),B===-1?K+=V(ne,!1,!1):(K+=V(ne.substr(0,B),!1,!1),K+=":",K+=V(ne.substr(B+1),!1,!0)),K+="@"}M=M.toLowerCase(),B=M.lastIndexOf(":"),B===-1?K+=V(M,!1,!0):(K+=V(M.substr(0,B),!1,!0),K+=M.substr(B))}if(I){if(I.length>=3&&I.charCodeAt(0)===47&&I.charCodeAt(2)===58){let B=I.charCodeAt(1);B>=65&&B<=90&&(I=`/${String.fromCharCode(B+32)}:${I.substr(3)}`)}else if(I.length>=2&&I.charCodeAt(1)===58){let B=I.charCodeAt(0);B>=65&&B<=90&&(I=`${String.fromCharCode(B+32)}:${I.substr(2)}`)}K+=V(I,!0,!1)}return z&&(K+="?",K+=V(z,!1,!1)),W&&(K+="#",K+=R?W:j(W,!1,!1)),K}function Y(H){try{return decodeURIComponent(H)}catch{return H.length>3?H.substr(0,3)+Y(H.substr(3)):H}}let k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function le(H){return H.match(k)?H.replace(k,(R=>Y(R))):H}var ue=t(975);let De=ue.posix||ue,vt="/";var on;(function(H){H.joinPath=function(R,...V){return R.with({path:De.join(R.path,...V)})},H.resolvePath=function(R,...V){let K=R.path,P=!1;K[0]!==vt&&(K=vt+K,P=!0);let M=De.resolve(K,...V);return P&&M[0]===vt&&!R.authority&&(M=M.substring(1)),R.with({path:M})},H.dirname=function(R){if(R.path.length===0||R.path===vt)return R;let V=De.dirname(R.path);return V.length===1&&V.charCodeAt(0)===46&&(V=""),R.with({path:V})},H.basename=function(R){return De.basename(R.path)},H.extname=function(R){return De.extname(R.path)}})(on||(on={})),ov=r})();var{URI:ex,Utils:Po}=ov;function cv(n){let e=sv(),t=av(),r=new rn.EventEmitter;return n.push(rn.extensions.onDidChange(i=>{let o=av();(o.length!==t.length||!o.every((s,a)=>s===t[a]))&&(t=o,r.fire())})),n.push(rn.workspace.onDidChangeConfiguration(i=>{i.affectsConfiguration("css.customData")&&(e=sv(),r.fire())})),{get uris(){return e.concat(t)},get onDidChange(){return r.event}}}function sv(){let n=rn.workspace.workspaceFolders,e=[];if(!n)return e;let t=(r,i)=>{if(Array.isArray(r))for(let o of r)typeof o=="string"&&e.push(Po.resolvePath(i,o).toString())};for(let r=0;r<n.length;r++){let i=n[r].uri,s=rn.workspace.getConfiguration("css",i).inspect("customData");s&&(t(s.workspaceFolderValue,i),r===0&&(rn.workspace.workspaceFile&&t(s.workspaceValue,rn.workspace.workspaceFile),t(s.globalValue,i)))}return e}function av(){let n=[];for(let e of rn.extensions.all){let t=e.packageJSON?.contributes?.css?.customData;if(Array.isArray(t))for(let r of t)n.push(Po.joinPath(e.extensionUri,r).toString())}return n}y();var Pr=require("vscode"),ra=Or(So()),uv;(e=>e.type=new ra.RequestType("fs/content"))(uv||={});var lv;(e=>e.type=new ra.RequestType("fs/stat"))(lv||={});var dv;(e=>e.type=new ra.RequestType("fs/readDir"))(dv||={});function fv(n,e){n.onRequest(uv.type,t=>{let r=Pr.Uri.parse(t.uri);return r.scheme==="file"&&e.fs?e.fs.getContent(t.uri):Pr.workspace.fs.readFile(r).then(i=>new e.TextDecoder(t.encoding).decode(i))}),n.onRequest(dv.type,t=>{let r=Pr.Uri.parse(t);return r.scheme==="file"&&e.fs?e.fs.readDirectory(t):Pr.workspace.fs.readDirectory(r)}),n.onRequest(lv.type,t=>{let r=Pr.Uri.parse(t);return r.scheme==="file"&&e.fs?e.fs.stat(t):Pr.workspace.fs.stat(r)})}var Of;(e=>e.type=new Ro.NotificationType("css/customDataChanged"))(Of||={});var NP=["newlineBetweenSelectors","newlineBetweenRules","spaceAroundSelectorSeparator","braceStyle","preserveNewLines","maxPreserveNewLines"];async function hv(n,e,t){let r=cv(n.subscriptions),i=["css","scss","less"],o=i.map(h=>({languageId:h,settingId:`${h}.format.enable`,provider:void 0})),s={documentSelector:i,synchronize:{configurationSection:["css","scss","less"]},initializationOptions:{handledSchemas:["file"],provideFormatter:!1,customCapabilities:{rangeFormatting:{editLimit:1e4}}},middleware:{provideCompletionItem(h,p,m,b,C){function j(k){let le=k.range;le instanceof fe.Range&&le.end.isAfter(p)&&le.start.isBeforeOrEqual(p)&&(k.range={inserting:new fe.Range(le.start,p),replacing:le})}function U(k){k.kind===fe.CompletionItemKind.Color&&(k.label={label:k.label,description:k.documentation})}function E(k){return k&&((Array.isArray(k)?k:k.items).forEach(j),(Array.isArray(k)?k:k.items).forEach(U)),k}function L(k){return!!k&&typeof k.then=="function"}let Y=C(h,p,m,b);return L(Y)?Y.then(E):E(Y)}}},a=e("css",fe.l10n.t("CSS Language Server"),s);a.registerProposedFeatures(),await a.start(),a.sendNotification(Of.type,r.uris),r.onDidChange(()=>{a.sendNotification(Of.type,r.uris)});for(let h of o)f(h),n.subscriptions.push({dispose:()=>h.provider?.dispose()}),n.subscriptions.push(fe.workspace.onDidChangeConfiguration(p=>p.affectsConfiguration(h.settingId)&&f(h)));fv(a,t),n.subscriptions.push(u());function u(){let h=/^(\s*)(\/(\*\s*(#\w*)?)?)?$/;return fe.languages.registerCompletionItemProvider(i,{provideCompletionItems(p,m){let C=p.getText(new fe.Range(new fe.Position(m.line,0),m)).match(h);if(C){let j=new fe.Range(new fe.Position(m.line,C[1].length),m),U=new fe.CompletionItem("#region",fe.CompletionItemKind.Snippet);U.range=j,fe.TextEdit.replace(j,"/* #region */"),U.insertText=new fe.SnippetString("/* #region $1*/"),U.documentation=fe.l10n.t("Folding Region Start"),U.filterText=C[2],U.sortText="za";let E=new fe.CompletionItem("#endregion",fe.CompletionItemKind.Snippet);return E.range=j,E.insertText="/* #endregion */",E.documentation=fe.l10n.t("Folding Region End"),E.sortText="zb",E.filterText=C[2],[U,E]}return null}})}fe.commands.registerCommand("_css.applyCodeAction",l);function l(h,p,m){let b=fe.window.activeTextEditor;b&&b.document.uri.toString()===h&&(b.document.version!==p&&fe.window.showInformationMessage(fe.l10n.t("CSS fix is outdated and can't be applied to the document.")),b.edit(C=>{for(let j of m)C.replace(a.protocol2CodeConverter.asRange(j.range),j.newText)}).then(C=>{C||fe.window.showErrorMessage(fe.l10n.t("Failed to apply CSS fix to the document. Please consider opening an issue with steps to reproduce."))}))}function f(h){let p=fe.workspace.getConfiguration().get(h.settingId);!p&&h.provider?(h.provider.dispose(),h.provider=void 0):p&&!h.provider&&(h.provider=fe.languages.registerDocumentRangeFormattingEditProvider(h.languageId,{provideDocumentRangeFormattingEdits(m,b,C,j){let U=fe.workspace.getConfiguration("files",m),E={trimTrailingWhitespace:U.get("trimTrailingWhitespace"),trimFinalNewlines:U.get("trimFinalNewlines"),insertFinalNewline:U.get("insertFinalNewline")},L={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(m),range:a.code2ProtocolConverter.asRange(b),options:a.code2ProtocolConverter.asFormattingOptions(C,E)},Y=fe.workspace.getConfiguration(h.languageId,m).get("format");if(Y)for(let k of NP){let le=Y[k];le!=null&&(L.options[k]=le)}return a.sendRequest(Ro.DocumentRangeFormattingRequest.type,L,j).then(a.protocol2CodeConverter.asTextEdits,k=>(a.handleFailedRequest(Ro.DocumentRangeFormattingRequest.type,void 0,k,[]),Promise.resolve([])))}}))}return a}var Rv=Or(_v());y();var Rr=Or(wv()),Ot=Or(require("vscode"));y();var Af=Or(require("vscode"));var sa=Object.freeze({file:"file",notebookCell:"vscode-notebook-cell",untitled:"untitled"}),aa=Object.freeze({plain:"text/plain",uriList:"text/uri-list"});function Dv(n){let e=JP(n);return e.scheme===sa.untitled?Af.workspace.workspaceFolders?.[0]?.uri:Po.dirname(e)}function JP(n){if(n.scheme===sa.notebookCell){for(let e of Af.workspace.notebookDocuments)for(let t of e.getCells())if(t.document.uri.toString()===n.toString())return e.uri}return n}y();var Sv=Or(require("vscode"));function QP(n){return n.split(`\r
|
|
22
|
+
`)}function XP(n){return QP(n).filter(e=>!e.startsWith("#")).map(e=>e.trim())}var To=class n{constructor(e){this.entries=e}static from(e){return new n(ZP(XP(e).map(t=>{try{return{uri:Sv.Uri.parse(t),str:t}}catch{return}})))}};function ZP(n){return n.filter(e=>!!e)}var Lf=class{kind=Ot.DocumentDropOrPasteEditKind.Empty.append("css","link","url");async provideDocumentDropEdits(e,t,r,i){let o=await this.getUriList(r);if(!o.entries.length||i.isCancellationRequested)return;let s=await this.createUriListSnippet(e.uri,o);if(!(!s||i.isCancellationRequested))return{kind:this.kind,title:s.label,insertText:s.snippet.value,yieldTo:this.pasteAsCssUrlByDefault(e,t)?[]:[Ot.DocumentDropOrPasteEditKind.Empty.append("uri")]}}async provideDocumentPasteEdits(e,t,r,i,o){let s=await this.getUriList(r);if(!s.entries.length||o.isCancellationRequested)return;let a=await this.createUriListSnippet(e.uri,s);if(!(!a||o.isCancellationRequested))return[{kind:this.kind,title:a.label,insertText:a.snippet.value,yieldTo:this.pasteAsCssUrlByDefault(e,t[0].start)?[]:[Ot.DocumentDropOrPasteEditKind.Empty.append("uri")]}]}async getUriList(e){let t=await e.get(aa.uriList)?.asString();if(t)return To.from(t);let r=[];for(let[i,o]of e){let s=o.asFile();s?.uri&&r.push(s.uri)}return new To(r.map(i=>({uri:i,str:i.toString(!0)})))}async createUriListSnippet(e,t){if(!t.entries.length)return;let r=new Ot.SnippetString;for(let i=0;i<t.entries.length;i++){let o=t.entries[i],a=YP(Dv(e),o.uri)??o.str;r.appendText(`url(${a})`),i!==t.entries.length-1&&r.appendText(" ")}return{snippet:r,label:t.entries.length>1?Ot.l10n.t("Insert url() Functions"):Ot.l10n.t("Insert url() Function")}}pasteAsCssUrlByDefault(e,t){let r=/url\(.+?\)/gi;for(let i of Array.from(e.lineAt(t.line).text.matchAll(r)))if(t.character>i.index&&t.character<i.index+i[0].length)return!1;return!0}};function YP(n,e){if(n&&n.scheme===e.scheme&&n.authority===e.authority){if(e.scheme===sa.file){let t=Rr.relative(n.fsPath,e.fsPath);return Rr.posix.normalize(t.split(Rr.sep).join(Rr.posix.sep))}return Rr.posix.relative(n.path,e.path)}}function Pv(n){let e=new Lf;return Ot.Disposable.from(Ot.languages.registerDocumentDropEditProvider(n,e,{providedDropEditKinds:[e.kind],dropMimeTypes:[aa.uriList,"files"]}),Ot.languages.registerDocumentPasteEditProvider(n,e,{providedPasteEditKinds:[e.kind],pasteMimeTypes:[aa.uriList,"files"]}))}var ca;async function eR(n){let e=ua.Uri.joinPath(n.extensionUri,"server/dist/browser/cssServerMain.js");try{let t=new Worker(e.toString());t.postMessage({i10lLocation:ua.l10n.uri?.toString(!0)??""}),ca=await hv(n,(i,o,s)=>new Rv.LanguageClient(i,o,t,s),{TextDecoder}),n.subscriptions.push(Pv({language:"css",scheme:"*"}))}catch(t){console.log(t)}}async function tR(){ca&&(await ca.stop(),ca=void 0)}
|
|
23
|
+
//# sourceMappingURL=cssClientMain.js.map
|