define("vs/htmlMode-DtjCNH-N",["exports","./workers-CbP2cVmy","./lspLanguageFeatures-A02kBDb6","./editor.api-i0YVFWkl"],(function(n,v,e,i){"use strict";class l{constructor(d){this._defaults=d,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),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(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=v.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...d){let t;return this._getClient().then(r=>{t=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(d)}).then(r=>t)}}class s extends e.CompletionAdapter{constructor(d){super(d,[".",":","<",'"',"=","/"])}}function f(o){const d=new l(o),t=(...c)=>d.getLanguageServiceWorker(...c);let r=o.languageId;i.languages.registerCompletionItemProvider(r,new s(t)),i.languages.registerHoverProvider(r,new e.HoverAdapter(t)),i.languages.registerDocumentHighlightProvider(r,new e.DocumentHighlightAdapter(t)),i.languages.registerLinkProvider(r,new e.DocumentLinkAdapter(t)),i.languages.registerFoldingRangeProvider(r,new e.FoldingRangeAdapter(t)),i.languages.registerDocumentSymbolProvider(r,new e.DocumentSymbolAdapter(t)),i.languages.registerSelectionRangeProvider(r,new e.SelectionRangeAdapter(t)),i.languages.registerRenameProvider(r,new e.RenameAdapter(t)),r==="html"&&(i.languages.registerDocumentFormattingEditProvider(r,new e.DocumentFormattingEditProvider(t)),i.languages.registerDocumentRangeFormattingEditProvider(r,new e.DocumentRangeFormattingEditProvider(t)))}function u(o){const d=[],t=[],r=new l(o);d.push(r);const c=(...g)=>r.getLanguageServiceWorker(...g);function A(){const{languageId:g,modeConfiguration:m}=o;a(t),m.completionItems&&t.push(i.languages.registerCompletionItemProvider(g,new s(c))),m.hovers&&t.push(i.languages.registerHoverProvider(g,new e.HoverAdapter(c))),m.documentHighlights&&t.push(i.languages.registerDocumentHighlightProvider(g,new e.DocumentHighlightAdapter(c))),m.links&&t.push(i.languages.registerLinkProvider(g,new e.DocumentLinkAdapter(c))),m.documentSymbols&&t.push(i.languages.registerDocumentSymbolProvider(g,new e.DocumentSymbolAdapter(c))),m.rename&&t.push(i.languages.registerRenameProvider(g,new e.RenameAdapter(c))),m.foldingRanges&&t.push(i.languages.registerFoldingRangeProvider(g,new e.FoldingRangeAdapter(c))),m.selectionRanges&&t.push(i.languages.registerSelectionRangeProvider(g,new e.SelectionRangeAdapter(c))),m.documentFormattingEdits&&t.push(i.languages.registerDocumentFormattingEditProvider(g,new e.DocumentFormattingEditProvider(c))),m.documentRangeFormattingEdits&&t.push(i.languages.registerDocumentRangeFormattingEditProvider(g,new e.DocumentRangeFormattingEditProvider(c)))}return A(),d.push(h(t)),h(d)}function h(o){return{dispose:()=>a(o)}}function a(o){for(;o.length;)o.pop().dispose()}n.CompletionAdapter=e.CompletionAdapter,n.DefinitionAdapter=e.DefinitionAdapter,n.DiagnosticsAdapter=e.DiagnosticsAdapter,n.DocumentColorAdapter=e.DocumentColorAdapter,n.DocumentFormattingEditProvider=e.DocumentFormattingEditProvider,n.DocumentHighlightAdapter=e.DocumentHighlightAdapter,n.DocumentLinkAdapter=e.DocumentLinkAdapter,n.DocumentRangeFormattingEditProvider=e.DocumentRangeFormattingEditProvider,n.DocumentSymbolAdapter=e.DocumentSymbolAdapter,n.FoldingRangeAdapter=e.FoldingRangeAdapter,n.HoverAdapter=e.HoverAdapter,n.ReferenceAdapter=e.ReferenceAdapter,n.RenameAdapter=e.RenameAdapter,n.SelectionRangeAdapter=e.SelectionRangeAdapter,n.fromPosition=e.fromPosition,n.fromRange=e.fromRange,n.toRange=e.toRange,n.toTextEdit=e.toTextEdit,n.WorkerManager=l,n.setupMode=u,n.setupMode1=f,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
