define("vs/htmlMode-27by_KM4",["exports","./html.worker-CA3iAimZ","./workers-BBttULjf","./lspLanguageFeatures-BIkJOWLw","./editor-KLE6jdfb"],function(e,t,r,n,i){"use strict";class o{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=r.createWebWorker({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(t.__worker_url_0__,{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}}class a extends n.CompletionAdapter{constructor(e){super(e,[".",":","<",'"',"=","/"])}}function g(e){return{dispose:()=>s(e)}}function s(e){for(;e.length;)e.pop().dispose()}e.CompletionAdapter=n.CompletionAdapter,e.DefinitionAdapter=n.DefinitionAdapter,e.DiagnosticsAdapter=n.DiagnosticsAdapter,e.DocumentColorAdapter=n.DocumentColorAdapter,e.DocumentFormattingEditProvider=n.DocumentFormattingEditProvider,e.DocumentHighlightAdapter=n.DocumentHighlightAdapter,e.DocumentLinkAdapter=n.DocumentLinkAdapter,e.DocumentRangeFormattingEditProvider=n.DocumentRangeFormattingEditProvider,e.DocumentSymbolAdapter=n.DocumentSymbolAdapter,e.FoldingRangeAdapter=n.FoldingRangeAdapter,e.HoverAdapter=n.HoverAdapter,e.ReferenceAdapter=n.ReferenceAdapter,e.RenameAdapter=n.RenameAdapter,e.SelectionRangeAdapter=n.SelectionRangeAdapter,e.fromPosition=n.fromPosition,e.fromRange=n.fromRange,e.toRange=n.toRange,e.toTextEdit=n.toTextEdit,e.WorkerManager=o,e.setupMode=function(e){const t=[],r=[],d=new o(e);t.push(d);const l=(...e)=>d.getLanguageServiceWorker(...e);return function(){const{languageId:t,modeConfiguration:o}=e;s(r),o.completionItems&&r.push(i.languages.registerCompletionItemProvider(t,new a(l))),o.hovers&&r.push(i.languages.registerHoverProvider(t,new n.HoverAdapter(l))),o.documentHighlights&&r.push(i.languages.registerDocumentHighlightProvider(t,new n.DocumentHighlightAdapter(l))),o.links&&r.push(i.languages.registerLinkProvider(t,new n.DocumentLinkAdapter(l))),o.documentSymbols&&r.push(i.languages.registerDocumentSymbolProvider(t,new n.DocumentSymbolAdapter(l))),o.rename&&r.push(i.languages.registerRenameProvider(t,new n.RenameAdapter(l))),o.foldingRanges&&r.push(i.languages.registerFoldingRangeProvider(t,new n.FoldingRangeAdapter(l))),o.selectionRanges&&r.push(i.languages.registerSelectionRangeProvider(t,new n.SelectionRangeAdapter(l))),o.documentFormattingEdits&&r.push(i.languages.registerDocumentFormattingEditProvider(t,new n.DocumentFormattingEditProvider(l))),o.documentRangeFormattingEdits&&r.push(i.languages.registerDocumentRangeFormattingEditProvider(t,new n.DocumentRangeFormattingEditProvider(l)))}(),t.push(g(r)),g(t)},e.setupMode1=function(e){const t=new o(e),r=(...e)=>t.getLanguageServiceWorker(...e);let g=e.languageId;i.languages.registerCompletionItemProvider(g,new a(r)),i.languages.registerHoverProvider(g,new n.HoverAdapter(r)),i.languages.registerDocumentHighlightProvider(g,new n.DocumentHighlightAdapter(r)),i.languages.registerLinkProvider(g,new n.DocumentLinkAdapter(r)),i.languages.registerFoldingRangeProvider(g,new n.FoldingRangeAdapter(r)),i.languages.registerDocumentSymbolProvider(g,new n.DocumentSymbolAdapter(r)),i.languages.registerSelectionRangeProvider(g,new n.SelectionRangeAdapter(r)),i.languages.registerRenameProvider(g,new n.RenameAdapter(r)),"html"===g&&(i.languages.registerDocumentFormattingEditProvider(g,new n.DocumentFormattingEditProvider(r)),i.languages.registerDocumentRangeFormattingEditProvider(g,new n.DocumentRangeFormattingEditProvider(r)))},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});