import{e as Oe,R as Pe,l as f,U as Xe}from"./editor.main-DpNMXfyH.js";import"./index-DT8qTvyx.js";var $e=2*60*1e3,Fe=function(){function n(r){var i=this;this._defaults=r,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return i._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return i._stopWorker()})}return n.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},n.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},n.prototype._checkIfIdle=function(){if(this._worker){var r=Date.now()-this._lastUsedTime;r>$e&&this._stopWorker()}},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Oe.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},n.prototype.getLanguageServiceWorker=function(){for(var r=this,i=[],t=0;t0&&(s.arguments=a),s}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.title)&&o.string(e.command)}n.is=i})(P||(P={}));var x;(function(n){function r(a,u){return{range:a,newText:u}}n.replace=r;function i(a,u){return{range:{start:a,end:a},newText:u}}n.insert=i;function t(a){return{range:a,newText:""}}n.del=t;function e(a){var u=a;return o.objectLiteral(u)&&o.string(u.newText)&&m.is(u.range)}n.is=e})(x||(x={}));var C;(function(n){function r(t,e,a){var u={label:t};return e!==void 0&&(u.needsConfirmation=e),a!==void 0&&(u.description=a),u}n.create=r;function i(t){var e=t;return e!==void 0&&o.objectLiteral(e)&&o.string(e.label)&&(o.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(o.string(e.description)||e.description===void 0)}n.is=i})(C||(C={}));var w;(function(n){function r(i){var t=i;return typeof t=="string"}n.is=r})(w||(w={}));var E;(function(n){function r(a,u,s){return{range:a,newText:u,annotationId:s}}n.replace=r;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}n.insert=i;function t(a,u){return{range:a,newText:"",annotationId:u}}n.del=t;function e(a){var u=a;return x.is(u)&&(C.is(u.annotationId)||w.is(u.annotationId))}n.is=e})(E||(E={}));var N;(function(n){function r(t,e){return{textDocument:t,edits:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&U.is(e.textDocument)&&Array.isArray(e.edits)}n.is=i})(N||(N={}));var F;(function(n){function r(t,e,a){var u={kind:"create",uri:t};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(u.options=e),a!==void 0&&(u.annotationId=a),u}n.create=r;function i(t){var e=t;return e&&e.kind==="create"&&o.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||o.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||o.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(F||(F={}));var T;(function(n){function r(t,e,a,u){var s={kind:"rename",oldUri:t,newUri:e};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}n.create=r;function i(t){var e=t;return e&&e.kind==="rename"&&o.string(e.oldUri)&&o.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||o.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||o.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(T||(T={}));var D;(function(n){function r(t,e,a){var u={kind:"delete",uri:t};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(u.options=e),a!==void 0&&(u.annotationId=a),u}n.create=r;function i(t){var e=t;return e&&e.kind==="delete"&&o.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||o.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||o.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(D||(D={}));var X;(function(n){function r(i){var t=i;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(function(e){return o.string(e.kind)?F.is(e)||T.is(e)||D.is(e):N.is(e)}))}n.is=r})(X||(X={}));var M=function(){function n(r,i){this.edits=r,this.changeAnnotations=i}return n.prototype.insert=function(r,i,t){var e,a;if(t===void 0?e=x.insert(r,i):w.is(t)?(a=t,e=E.insert(r,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(t),e=E.insert(r,i,a)),this.edits.push(e),a!==void 0)return a},n.prototype.replace=function(r,i,t){var e,a;if(t===void 0?e=x.replace(r,i):w.is(t)?(a=t,e=E.replace(r,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(t),e=E.replace(r,i,a)),this.edits.push(e),a!==void 0)return a},n.prototype.delete=function(r,i){var t,e;if(i===void 0?t=x.del(r):w.is(i)?(e=i,t=E.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(i),t=E.del(r,e)),this.edits.push(t),e!==void 0)return e},n.prototype.add=function(r){this.edits.push(r)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),re=function(){function n(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(r,i){var t;if(w.is(r)?t=r:(t=this.nextId(),i=r),this._annotations[t]!==void 0)throw new Error("Id "+t+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+t);return this._annotations[t]=i,this._size++,t},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();(function(){function n(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new re(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(t){if(N.is(t)){var e=new M(t.edits,i._changeAnnotations);i._textEditChanges[t.textDocument.uri]=e}})):r.changes&&Object.keys(r.changes).forEach(function(t){var e=new M(r.changes[t]);i._textEditChanges[t]=e})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(r){if(U.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},t=this._textEditChanges[i.uri];if(!t){var e=[],a={textDocument:i,edits:e};this._workspaceEdit.documentChanges.push(a),t=new M(e,this._changeAnnotations),this._textEditChanges[i.uri]=t}return t}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var t=this._textEditChanges[r];if(!t){var e=[];this._workspaceEdit.changes[r]=e,t=new M(e),this._textEditChanges[r]=t}return t}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new re,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(r,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;C.is(i)||w.is(i)?e=i:t=i;var a,u;if(e===void 0?a=F.create(r,t):(u=w.is(e)?e:this._changeAnnotations.manage(e),a=F.create(r,t,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},n.prototype.renameFile=function(r,i,t,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;C.is(t)||w.is(t)?a=t:e=t;var u,s;if(a===void 0?u=T.create(r,i,e):(s=w.is(a)?a:this._changeAnnotations.manage(a),u=T.create(r,i,e,s)),this._workspaceEdit.documentChanges.push(u),s!==void 0)return s},n.prototype.deleteFile=function(r,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;C.is(i)||w.is(i)?e=i:t=i;var a,u;if(e===void 0?a=D.create(r,t):(u=w.is(e)?e:this._changeAnnotations.manage(e),a=D.create(r,t,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},n})();var ie;(function(n){function r(t){return{uri:t}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)}n.is=i})(ie||(ie={}));var ae;(function(n){function r(t,e){return{uri:t,version:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&o.integer(e.version)}n.is=i})(ae||(ae={}));var U;(function(n){function r(t,e){return{uri:t,version:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&(e.version===null||o.integer(e.version))}n.is=i})(U||(U={}));var ue;(function(n){function r(t,e,a,u){return{uri:t,languageId:e,version:a,text:u}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&o.string(e.languageId)&&o.integer(e.version)&&o.string(e.text)}n.is=i})(ue||(ue={}));var S;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(S||(S={}));(function(n){function r(i){var t=i;return t===n.PlainText||t===n.Markdown}n.is=r})(S||(S={}));var $;(function(n){function r(i){var t=i;return o.objectLiteral(i)&&S.is(t.kind)&&o.string(t.value)}n.is=r})($||($={}));var h;(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})(h||(h={}));var B;(function(n){n.PlainText=1,n.Snippet=2})(B||(B={}));var oe;(function(n){n.Deprecated=1})(oe||(oe={}));var se;(function(n){function r(t,e,a){return{newText:t,insert:e,replace:a}}n.create=r;function i(t){var e=t;return e&&o.string(e.newText)&&m.is(e.insert)&&m.is(e.replace)}n.is=i})(se||(se={}));var ce;(function(n){n.asIs=1,n.adjustIndentation=2})(ce||(ce={}));var de;(function(n){function r(i){return{label:i}}n.create=r})(de||(de={}));var fe;(function(n){function r(i,t){return{items:i||[],isIncomplete:!!t}}n.create=r})(fe||(fe={}));var H;(function(n){function r(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=r;function i(t){var e=t;return o.string(e)||o.objectLiteral(e)&&o.string(e.language)&&o.string(e.value)}n.is=i})(H||(H={}));var ge;(function(n){function r(i){var t=i;return!!t&&o.objectLiteral(t)&&($.is(t.contents)||H.is(t.contents)||o.typedArray(t.contents,H.is))&&(i.range===void 0||m.is(i.range))}n.is=r})(ge||(ge={}));var le;(function(n){function r(i,t){return t?{label:i,documentation:t}:{label:i}}n.create=r})(le||(le={}));var he;(function(n){function r(i,t){for(var e=[],a=2;a=0;d--){var p=g[d],b=a.offsetAt(p.range.start),c=a.offsetAt(p.range.end);if(c<=l)s=s.substring(0,b)+p.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}n.applyEdits=t;function e(a,u){if(a.length<=1)return a;var s=a.length/2|0,g=a.slice(0,s),l=a.slice(s);e(g,u),e(l,u);for(var d=0,p=0,b=0;d0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},n.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),t=0,e=i.length;if(e===0)return k.create(0,r);for(;tr?e=a:t=a+1}var u=t-1;return k.create(u,r-i[u])},n.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var t=i[r.line],e=r.line+1"u"}n.undefined=t;function e(c){return c===!0||c===!1}n.boolean=e;function a(c){return r.call(c)==="[object String]"}n.string=a;function u(c){return r.call(c)==="[object Number]"}n.number=u;function s(c,y,L){return r.call(c)==="[object Number]"&&y<=c&&c<=L}n.numberRange=s;function g(c){return r.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}n.integer=g;function l(c){return r.call(c)==="[object Number]"&&0<=c&&c<=2147483647}n.uinteger=l;function d(c){return r.call(c)==="[object Function]"}n.func=d;function p(c){return c!==null&&typeof c=="object"}n.objectLiteral=p;function b(c,y){return Array.isArray(c)&&c.every(y)}n.typedArray=b})(o||(o={}));function A(n){if(n)return{character:n.column-1,line:n.lineNumber-1}}function qe(n){if(n)return{start:A(n.getStartPosition()),end:A(n.getEndPosition())}}function _(n){if(n)return new Pe(n.start.line+1,n.start.character+1,n.end.line+1,n.end.character+1)}function Qe(n){return typeof n.insert<"u"&&typeof n.replace<"u"}function Ge(n){var r=f.CompletionItemKind;switch(n){case h.Text:return r.Text;case h.Method:return r.Method;case h.Function:return r.Function;case h.Constructor:return r.Constructor;case h.Field:return r.Field;case h.Variable:return r.Variable;case h.Class:return r.Class;case h.Interface:return r.Interface;case h.Module:return r.Module;case h.Property:return r.Property;case h.Unit:return r.Unit;case h.Value:return r.Value;case h.Enum:return r.Enum;case h.Keyword:return r.Keyword;case h.Snippet:return r.Snippet;case h.Color:return r.Color;case h.File:return r.File;case h.Reference:return r.Reference}return r.Property}function q(n){if(n)return{range:_(n.range),text:n.newText}}function Je(n){return n&&n.command==="editor.action.triggerSuggest"?{id:n.command,title:n.title,arguments:n.arguments}:void 0}var Te=function(){function n(r){this._worker=r}return Object.defineProperty(n.prototype,"triggerCharacters",{get:function(){return[".",":","<",'"',"=","/"]},enumerable:!1,configurable:!0}),n.prototype.provideCompletionItems=function(r,i,t,e){var a=r.uri;return this._worker(a).then(function(u){return u.doComplete(a.toString(),A(i))}).then(function(u){if(u){var s=r.getWordUntilPosition(i),g=new Pe(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=u.items.map(function(d){var p={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,command:Je(d.command),detail:d.detail,range:g,kind:Ge(d.kind)};return d.textEdit&&(Qe(d.textEdit)?p.range={insert:_(d.textEdit.insert),replace:_(d.textEdit.replace)}:p.range=_(d.textEdit.range),p.insertText=d.textEdit.newText),d.additionalTextEdits&&(p.additionalTextEdits=d.additionalTextEdits.map(q)),d.insertTextFormat===B.Snippet&&(p.insertTextRules=f.CompletionItemInsertTextRule.InsertAsSnippet),p});return{isIncomplete:u.isIncomplete,suggestions:l}}})},n}();function Ye(n){return n&&typeof n=="object"&&typeof n.kind=="string"}function Re(n){return typeof n=="string"?{value:n}:Ye(n)?n.kind==="plaintext"?{value:n.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:n.value}:{value:"```"+n.language+` `+n.value+"\n```\n"}}function Ze(n){if(n)return Array.isArray(n)?n.map(Re):[Re(n)]}var De=function(){function n(r){this._worker=r}return n.prototype.provideHover=function(r,i,t){var e=r.uri;return this._worker(e).then(function(a){return a.doHover(e.toString(),A(i))}).then(function(a){if(a)return{range:_(a.range),contents:Ze(a.contents)}})},n}();function Ke(n){var r=f.DocumentHighlightKind;switch(n){case I.Read:return r.Read;case I.Write:return r.Write;case I.Text:return r.Text}return r.Text}var Se=function(){function n(r){this._worker=r}return n.prototype.provideDocumentHighlights=function(r,i,t){var e=r.uri;return this._worker(e).then(function(a){return a.findDocumentHighlights(e.toString(),A(i))}).then(function(a){if(a)return a.map(function(u){return{range:_(u.range),kind:Ke(u.kind)}})})},n}();function en(n){var r=f.SymbolKind;switch(n){case v.File:return r.Array;case v.Module:return r.Module;case v.Namespace:return r.Namespace;case v.Package:return r.Package;case v.Class:return r.Class;case v.Method:return r.Method;case v.Property:return r.Property;case v.Field:return r.Field;case v.Constructor:return r.Constructor;case v.Enum:return r.Enum;case v.Interface:return r.Interface;case v.Function:return r.Function;case v.Variable:return r.Variable;case v.Constant:return r.Constant;case v.String:return r.String;case v.Number:return r.Number;case v.Boolean:return r.Boolean;case v.Array:return r.Array}return r.Function}var Le=function(){function n(r){this._worker=r}return n.prototype.provideDocumentSymbols=function(r,i){var t=r.uri;return this._worker(t).then(function(e){return e.findDocumentSymbols(t.toString())}).then(function(e){if(e)return e.map(function(a){return{name:a.name,detail:"",containerName:a.containerName,kind:en(a.kind),tags:[],range:_(a.location.range),selectionRange:_(a.location.range)}})})},n}(),Me=function(){function n(r){this._worker=r}return n.prototype.provideLinks=function(r,i){var t=r.uri;return this._worker(t).then(function(e){return e.findDocumentLinks(t.toString())}).then(function(e){if(e)return{links:e.map(function(a){return{range:_(a.range),url:a.target}})}})},n}();function je(n){return{tabSize:n.tabSize,insertSpaces:n.insertSpaces}}var We=function(){function n(r){this._worker=r}return n.prototype.provideDocumentFormattingEdits=function(r,i,t){var e=r.uri;return this._worker(e).then(function(a){return a.format(e.toString(),null,je(i)).then(function(u){if(!(!u||u.length===0))return u.map(q)})})},n}(),Ne=function(){function n(r){this._worker=r}return n.prototype.provideDocumentRangeFormattingEdits=function(r,i,t,e){var a=r.uri;return this._worker(a).then(function(u){return u.format(a.toString(),qe(i),je(t)).then(function(s){if(!(!s||s.length===0))return s.map(q)})})},n}(),Ue=function(){function n(r){this._worker=r}return n.prototype.provideRenameEdits=function(r,i,t,e){var a=r.uri;return this._worker(a).then(function(u){return u.doRename(a.toString(),A(i),t)}).then(function(u){return nn(u)})},n}();function nn(n){if(!(!n||!n.changes)){var r=[];for(var i in n.changes)for(var t=Xe.parse(i),e=0,a=n.changes[i];e