define("vs/htmlMode-27by_KM4",["exports","./html.worker-CA3iAimZ","./workers-BBttULjf","./lspLanguageFeatures-BIkJOWLw","./editor-KLE6jdfb"],(function(i,_,v,e,n){"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",createWorker:()=>new Worker(_.__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(...d){let t;return this._getClient().then(r=>{t=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(d)}).then(r=>t)}}class a extends e.CompletionAdapter{constructor(d){super(d,[".",":","<",'"',"=","/"])}}function u(o){const d=new l(o),t=(...c)=>d.getLanguageServiceWorker(...c);let r=o.languageId;n.languages.registerCompletionItemProvider(r,new a(t)),n.languages.registerHoverProvider(r,new e.HoverAdapter(t)),n.languages.registerDocumentHighlightProvider(r,new e.DocumentHighlightAdapter(t)),n.languages.registerLinkProvider(r,new e.DocumentLinkAdapter(t)),n.languages.registerFoldingRangeProvider(r,new e.FoldingRangeAdapter(t)),n.languages.registerDocumentSymbolProvider(r,new e.DocumentSymbolAdapter(t)),n.languages.registerSelectionRangeProvider(r,new e.SelectionRangeAdapter(t)),n.languages.registerRenameProvider(r,new e.RenameAdapter(t)),r==="html"&&(n.languages.registerDocumentFormattingEditProvider(r,new e.DocumentFormattingEditProvider(t)),n.languages.registerDocumentRangeFormattingEditProvider(r,new e.DocumentRangeFormattingEditProvider(t)))}function w(o){const d=[],t=[],r=new l(o);d.push(r);const c=(...g)=>r.getLanguageServiceWorker(...g);function f(){const{languageId:g,modeConfiguration:m}=o;h(t),m.completionItems&&t.push(n.languages.registerCompletionItemProvider(g,new a(c))),m.hovers&&t.push(n.languages.registerHoverProvider(g,new e.HoverAdapter(c))),m.documentHighlights&&t.push(n.languages.registerDocumentHighlightProvider(g,new e.DocumentHighlightAdapter(c))),m.links&&t.push(n.languages.registerLinkProvider(g,new e.DocumentLinkAdapter(c))),m.documentSymbols&&t.push(n.languages.registerDocumentSymbolProvider(g,new e.DocumentSymbolAdapter(c))),m.rename&&t.push(n.languages.registerRenameProvider(g,new e.RenameAdapter(c))),m.foldingRanges&&t.push(n.languages.registerFoldingRangeProvider(g,new e.FoldingRangeAdapter(c))),m.selectionRanges&&t.push(n.languages.registerSelectionRangeProvider(g,new e.SelectionRangeAdapter(c))),m.documentFormattingEdits&&t.push(n.languages.registerDocumentFormattingEditProvider(g,new e.DocumentFormattingEditProvider(c))),m.documentRangeFormattingEdits&&t.push(n.languages.registerDocumentRangeFormattingEditProvider(g,new e.DocumentRangeFormattingEditProvider(c)))}return f(),d.push(s(t)),s(d)}function s(o){return{dispose:()=>h(o)}}function h(o){for(;o.length;)o.pop().dispose()}i.CompletionAdapter=e.CompletionAdapter,i.DefinitionAdapter=e.DefinitionAdapter,i.DiagnosticsAdapter=e.DiagnosticsAdapter,i.DocumentColorAdapter=e.DocumentColorAdapter,i.DocumentFormattingEditProvider=e.DocumentFormattingEditProvider,i.DocumentHighlightAdapter=e.DocumentHighlightAdapter,i.DocumentLinkAdapter=e.DocumentLinkAdapter,i.DocumentRangeFormattingEditProvider=e.DocumentRangeFormattingEditProvider,i.DocumentSymbolAdapter=e.DocumentSymbolAdapter,i.FoldingRangeAdapter=e.FoldingRangeAdapter,i.HoverAdapter=e.HoverAdapter,i.ReferenceAdapter=e.ReferenceAdapter,i.RenameAdapter=e.RenameAdapter,i.SelectionRangeAdapter=e.SelectionRangeAdapter,i.fromPosition=e.fromPosition,i.fromRange=e.fromRange,i.toRange=e.toRange,i.toTextEdit=e.toTextEdit,i.WorkerManager=l,i.setupMode=w,i.setupMode1=u,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
