htmlMode-C-DxRcIA.js 109 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import{e as Ce,R as ce,l as U,U as Te}from"./index-DFpXF1Cy.js";var Oe=2*60*1e3,le=function(){function n(_){var u=this;this._defaults=_,this._worker=null,this._idleCheckInterval=setInterval(function(){return u._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return u._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 _=Date.now()-this._lastUsedTime;_>Oe&&this._stopWorker()}},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Ce.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 _=this,u=[],i=0;i<arguments.length;i++)u[i]=arguments[i];var t;return this._getClient().then(function(r){t=r}).then(function(r){if(_._worker)return _._worker.withSyncedResources(u)}).then(function(r){return t})},n}(),At;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647})(At||(At={}));var ht;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647})(ht||(ht={}));var Q;(function(n){function _(i,t){return i===Number.MAX_VALUE&&(i=ht.MAX_VALUE),t===Number.MAX_VALUE&&(t=ht.MAX_VALUE),{line:i,character:t}}n.create=_;function u(i){var t=i;return g.objectLiteral(t)&&g.uinteger(t.line)&&g.uinteger(t.character)}n.is=u})(Q||(Q={}));var V;(function(n){function _(i,t,r,s){if(g.uinteger(i)&&g.uinteger(t)&&g.uinteger(r)&&g.uinteger(s))return{start:Q.create(i,t),end:Q.create(r,s)};if(Q.is(i)&&Q.is(t))return{start:i,end:t};throw new Error("Range#create called with invalid arguments["+i+", "+t+", "+r+", "+s+"]")}n.create=_;function u(i){var t=i;return g.objectLiteral(t)&&Q.is(t.start)&&Q.is(t.end)}n.is=u})(V||(V={}));var dt;(function(n){function _(i,t){return{uri:i,range:t}}n.create=_;function u(i){var t=i;return g.defined(t)&&V.is(t.range)&&(g.string(t.uri)||g.undefined(t.uri))}n.is=u})(dt||(dt={}));var Et;(function(n){function _(i,t,r,s){return{targetUri:i,targetRange:t,targetSelectionRange:r,originSelectionRange:s}}n.create=_;function u(i){var t=i;return g.defined(t)&&V.is(t.targetRange)&&g.string(t.targetUri)&&(V.is(t.targetSelectionRange)||g.undefined(t.targetSelectionRange))&&(V.is(t.originSelectionRange)||g.undefined(t.originSelectionRange))}n.is=u})(Et||(Et={}));var gt;(function(n){function _(i,t,r,s){return{red:i,green:t,blue:r,alpha:s}}n.create=_;function u(i){var t=i;return g.numberRange(t.red,0,1)&&g.numberRange(t.green,0,1)&&g.numberRange(t.blue,0,1)&&g.numberRange(t.alpha,0,1)}n.is=u})(gt||(gt={}));var kt;(function(n){function _(i,t){return{range:i,color:t}}n.create=_;function u(i){var t=i;return V.is(t.range)&&gt.is(t.color)}n.is=u})(kt||(kt={}));var Ct;(function(n){function _(i,t,r){return{label:i,textEdit:t,additionalTextEdits:r}}n.create=_;function u(i){var t=i;return g.string(t.label)&&(g.undefined(t.textEdit)||J.is(t))&&(g.undefined(t.additionalTextEdits)||g.typedArray(t.additionalTextEdits,J.is))}n.is=u})(Ct||(Ct={}));var nt;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(nt||(nt={}));var Tt;(function(n){function _(i,t,r,s,e){var a={startLine:i,endLine:t};return g.defined(r)&&(a.startCharacter=r),g.defined(s)&&(a.endCharacter=s),g.defined(e)&&(a.kind=e),a}n.create=_;function u(i){var t=i;return g.uinteger(t.startLine)&&g.uinteger(t.startLine)&&(g.undefined(t.startCharacter)||g.uinteger(t.startCharacter))&&(g.undefined(t.endCharacter)||g.uinteger(t.endCharacter))&&(g.undefined(t.kind)||g.string(t.kind))}n.is=u})(Tt||(Tt={}));var vt;(function(n){function _(i,t){return{location:i,message:t}}n.create=_;function u(i){var t=i;return g.defined(t)&&dt.is(t.location)&&g.string(t.message)}n.is=u})(vt||(vt={}));var Ot;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Ot||(Ot={}));var Pt;(function(n){n.Unnecessary=1,n.Deprecated=2})(Pt||(Pt={}));var jt;(function(n){function _(u){var i=u;return i!=null&&g.string(i.href)}n.is=_})(jt||(jt={}));var ct;(function(n){function _(i,t,r,s,e,a){var o={range:i,message:t};return g.defined(r)&&(o.severity=r),g.defined(s)&&(o.code=s),g.defined(e)&&(o.source=e),g.defined(a)&&(o.relatedInformation=a),o}n.create=_;function u(i){var t,r=i;return g.defined(r)&&V.is(r.range)&&g.string(r.message)&&(g.number(r.severity)||g.undefined(r.severity))&&(g.integer(r.code)||g.string(r.code)||g.undefined(r.code))&&(g.undefined(r.codeDescription)||g.string((t=r.codeDescription)===null||t===void 0?void 0:t.href))&&(g.string(r.source)||g.undefined(r.source))&&(g.undefined(r.relatedInformation)||g.typedArray(r.relatedInformation,vt.is))}n.is=u})(ct||(ct={}));var rt;(function(n){function _(i,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];var e={title:i,command:t};return g.defined(r)&&r.length>0&&(e.arguments=r),e}n.create=_;function u(i){var t=i;return g.defined(t)&&g.string(t.title)&&g.string(t.command)}n.is=u})(rt||(rt={}));var J;(function(n){function _(r,s){return{range:r,newText:s}}n.replace=_;function u(r,s){return{range:{start:r,end:r},newText:s}}n.insert=u;function i(r){return{range:r,newText:""}}n.del=i;function t(r){var s=r;return g.objectLiteral(s)&&g.string(s.newText)&&V.is(s.range)}n.is=t})(J||(J={}));var et;(function(n){function _(i,t,r){var s={label:i};return t!==void 0&&(s.needsConfirmation=t),r!==void 0&&(s.description=r),s}n.create=_;function u(i){var t=i;return t!==void 0&&g.objectLiteral(t)&&g.string(t.label)&&(g.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(g.string(t.description)||t.description===void 0)}n.is=u})(et||(et={}));var $;(function(n){function _(u){var i=u;return typeof i=="string"}n.is=_})($||($={}));var Z;(function(n){function _(r,s,e){return{range:r,newText:s,annotationId:e}}n.replace=_;function u(r,s,e){return{range:{start:r,end:r},newText:s,annotationId:e}}n.insert=u;function i(r,s){return{range:r,newText:"",annotationId:s}}n.del=i;function t(r){var s=r;return J.is(s)&&(et.is(s.annotationId)||$.is(s.annotationId))}n.is=t})(Z||(Z={}));var lt;(function(n){function _(i,t){return{textDocument:i,edits:t}}n.create=_;function u(i){var t=i;return g.defined(t)&&pt.is(t.textDocument)&&Array.isArray(t.edits)}n.is=u})(lt||(lt={}));var st;(function(n){function _(i,t,r){var s={kind:"create",uri:i};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),r!==void 0&&(s.annotationId=r),s}n.create=_;function u(i){var t=i;return t&&t.kind==="create"&&g.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||g.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||g.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||$.is(t.annotationId))}n.is=u})(st||(st={}));var at;(function(n){function _(i,t,r,s){var e={kind:"rename",oldUri:i,newUri:t};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(e.options=r),s!==void 0&&(e.annotationId=s),e}n.create=_;function u(i){var t=i;return t&&t.kind==="rename"&&g.string(t.oldUri)&&g.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||g.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||g.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||$.is(t.annotationId))}n.is=u})(at||(at={}));var ot;(function(n){function _(i,t,r){var s={kind:"delete",uri:i};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),r!==void 0&&(s.annotationId=r),s}n.create=_;function u(i){var t=i;return t&&t.kind==="delete"&&g.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||g.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||g.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||$.is(t.annotationId))}n.is=u})(ot||(ot={}));var mt;(function(n){function _(u){var i=u;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(t){return g.string(t.kind)?st.is(t)||at.is(t)||ot.is(t):lt.is(t)}))}n.is=_})(mt||(mt={}));var ut=function(){function n(_,u){this.edits=_,this.changeAnnotations=u}return n.prototype.insert=function(_,u,i){var t,r;if(i===void 0?t=J.insert(_,u):$.is(i)?(r=i,t=Z.insert(_,u,i)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(i),t=Z.insert(_,u,r)),this.edits.push(t),r!==void 0)return r},n.prototype.replace=function(_,u,i){var t,r;if(i===void 0?t=J.replace(_,u):$.is(i)?(r=i,t=Z.replace(_,u,i)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(i),t=Z.replace(_,u,r)),this.edits.push(t),r!==void 0)return r},n.prototype.delete=function(_,u){var i,t;if(u===void 0?i=J.del(_):$.is(u)?(t=u,i=Z.del(_,u)):(this.assertChangeAnnotations(this.changeAnnotations),t=this.changeAnnotations.manage(u),i=Z.del(_,t)),this.edits.push(i),t!==void 0)return t},n.prototype.add=function(_){this.edits.push(_)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(_){if(_===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),It=function(){function n(_){this._annotations=_===void 0?Object.create(null):_,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(_,u){var i;if($.is(_)?i=_:(i=this.nextId(),u=_),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(u===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=u,this._size++,i},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();(function(){function n(_){var u=this;this._textEditChanges=Object.create(null),_!==void 0?(this._workspaceEdit=_,_.documentChanges?(this._changeAnnotations=new It(_.changeAnnotations),_.changeAnnotations=this._changeAnnotations.all(),_.documentChanges.forEach(function(i){if(lt.is(i)){var t=new ut(i.edits,u._changeAnnotations);u._textEditChanges[i.textDocument.uri]=t}})):_.changes&&Object.keys(_.changes).forEach(function(i){var t=new ut(_.changes[i]);u._textEditChanges[i]=t})):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(_){if(pt.is(_)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var u={uri:_.uri,version:_.version},i=this._textEditChanges[u.uri];if(!i){var t=[],r={textDocument:u,edits:t};this._workspaceEdit.documentChanges.push(r),i=new ut(t,this._changeAnnotations),this._textEditChanges[u.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[_];if(!i){var t=[];this._workspaceEdit.changes[_]=t,i=new ut(t),this._textEditChanges[_]=i}return i}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new It,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(_,u,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t;et.is(u)||$.is(u)?t=u:i=u;var r,s;if(t===void 0?r=st.create(_,i):(s=$.is(t)?t:this._changeAnnotations.manage(t),r=st.create(_,i,s)),this._workspaceEdit.documentChanges.push(r),s!==void 0)return s},n.prototype.renameFile=function(_,u,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;et.is(i)||$.is(i)?r=i:t=i;var s,e;if(r===void 0?s=at.create(_,u,t):(e=$.is(r)?r:this._changeAnnotations.manage(r),s=at.create(_,u,t,e)),this._workspaceEdit.documentChanges.push(s),e!==void 0)return e},n.prototype.deleteFile=function(_,u,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t;et.is(u)||$.is(u)?t=u:i=u;var r,s;if(t===void 0?r=ot.create(_,i):(s=$.is(t)?t:this._changeAnnotations.manage(t),r=ot.create(_,i,s)),this._workspaceEdit.documentChanges.push(r),s!==void 0)return s},n})();var St;(function(n){function _(i){return{uri:i}}n.create=_;function u(i){var t=i;return g.defined(t)&&g.string(t.uri)}n.is=u})(St||(St={}));var Rt;(function(n){function _(i,t){return{uri:i,version:t}}n.create=_;function u(i){var t=i;return g.defined(t)&&g.string(t.uri)&&g.integer(t.version)}n.is=u})(Rt||(Rt={}));var pt;(function(n){function _(i,t){return{uri:i,version:t}}n.create=_;function u(i){var t=i;return g.defined(t)&&g.string(t.uri)&&(t.version===null||g.integer(t.version))}n.is=u})(pt||(pt={}));var Ut;(function(n){function _(i,t,r,s){return{uri:i,languageId:t,version:r,text:s}}n.create=_;function u(i){var t=i;return g.defined(t)&&g.string(t.uri)&&g.string(t.languageId)&&g.integer(t.version)&&g.string(t.text)}n.is=u})(Ut||(Ut={}));var Y;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(Y||(Y={}));(function(n){function _(u){var i=u;return i===n.PlainText||i===n.Markdown}n.is=_})(Y||(Y={}));var yt;(function(n){function _(u){var i=u;return g.objectLiteral(u)&&Y.is(i.kind)&&g.string(i.value)}n.is=_})(yt||(yt={}));var M;(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})(M||(M={}));var wt;(function(n){n.PlainText=1,n.Snippet=2})(wt||(wt={}));var Nt;(function(n){n.Deprecated=1})(Nt||(Nt={}));var Lt;(function(n){function _(i,t,r){return{newText:i,insert:t,replace:r}}n.create=_;function u(i){var t=i;return t&&g.string(t.newText)&&V.is(t.insert)&&V.is(t.replace)}n.is=u})(Lt||(Lt={}));var zt;(function(n){n.asIs=1,n.adjustIndentation=2})(zt||(zt={}));var Dt;(function(n){function _(u){return{label:u}}n.create=_})(Dt||(Dt={}));var Wt;(function(n){function _(u,i){return{items:u||[],isIncomplete:!!i}}n.create=_})(Wt||(Wt={}));var ft;(function(n){function _(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=_;function u(i){var t=i;return g.string(t)||g.objectLiteral(t)&&g.string(t.language)&&g.string(t.value)}n.is=u})(ft||(ft={}));var Mt;(function(n){function _(u){var i=u;return!!i&&g.objectLiteral(i)&&(yt.is(i.contents)||ft.is(i.contents)||g.typedArray(i.contents,ft.is))&&(u.range===void 0||V.is(u.range))}n.is=_})(Mt||(Mt={}));var Ft;(function(n){function _(u,i){return i?{label:u,documentation:i}:{label:u}}n.create=_})(Ft||(Ft={}));var Bt;(function(n){function _(u,i){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var s={label:u};return g.defined(i)&&(s.documentation=i),g.defined(t)?s.parameters=t:s.parameters=[],s}n.create=_})(Bt||(Bt={}));var it;(function(n){n.Text=1,n.Read=2,n.Write=3})(it||(it={}));var Vt;(function(n){function _(u,i){var t={range:u};return g.number(i)&&(t.kind=i),t}n.create=_})(Vt||(Vt={}));var F;(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})(F||(F={}));var Gt;(function(n){n.Deprecated=1})(Gt||(Gt={}));var $t;(function(n){function _(u,i,t,r,s){var e={name:u,kind:i,location:{uri:r,range:t}};return s&&(e.containerName=s),e}n.create=_})($t||($t={}));var Ht;(function(n){function _(i,t,r,s,e,a){var o={name:i,detail:t,kind:r,range:s,selectionRange:e};return a!==void 0&&(o.children=a),o}n.create=_;function u(i){var t=i;return t&&g.string(t.name)&&g.number(t.kind)&&V.is(t.range)&&V.is(t.selectionRange)&&(t.detail===void 0||g.string(t.detail))&&(t.deprecated===void 0||g.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}n.is=u})(Ht||(Ht={}));var Xt;(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(Xt||(Xt={}));var Qt;(function(n){function _(i,t){var r={diagnostics:i};return t!=null&&(r.only=t),r}n.create=_;function u(i){var t=i;return g.defined(t)&&g.typedArray(t.diagnostics,ct.is)&&(t.only===void 0||g.typedArray(t.only,g.string))}n.is=u})(Qt||(Qt={}));var qt;(function(n){function _(i,t,r){var s={title:i},e=!0;return typeof t=="string"?(e=!1,s.kind=t):rt.is(t)?s.command=t:s.edit=t,e&&r!==void 0&&(s.kind=r),s}n.create=_;function u(i){var t=i;return t&&g.string(t.title)&&(t.diagnostics===void 0||g.typedArray(t.diagnostics,ct.is))&&(t.kind===void 0||g.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||rt.is(t.command))&&(t.isPreferred===void 0||g.boolean(t.isPreferred))&&(t.edit===void 0||mt.is(t.edit))}n.is=u})(qt||(qt={}));var Yt;(function(n){function _(i,t){var r={range:i};return g.defined(t)&&(r.data=t),r}n.create=_;function u(i){var t=i;return g.defined(t)&&V.is(t.range)&&(g.undefined(t.command)||rt.is(t.command))}n.is=u})(Yt||(Yt={}));var Zt;(function(n){function _(i,t){return{tabSize:i,insertSpaces:t}}n.create=_;function u(i){var t=i;return g.defined(t)&&g.uinteger(t.tabSize)&&g.boolean(t.insertSpaces)}n.is=u})(Zt||(Zt={}));var Jt;(function(n){function _(i,t,r){return{range:i,target:t,data:r}}n.create=_;function u(i){var t=i;return g.defined(t)&&V.is(t.range)&&(g.undefined(t.target)||g.string(t.target))}n.is=u})(Jt||(Jt={}));var Kt;(function(n){function _(i,t){return{range:i,parent:t}}n.create=_;function u(i){var t=i;return t!==void 0&&V.is(t.range)&&(t.parent===void 0||n.is(t.parent))}n.is=u})(Kt||(Kt={}));var te;(function(n){function _(r,s,e,a){return new Pe(r,s,e,a)}n.create=_;function u(r){var s=r;return!!(g.defined(s)&&g.string(s.uri)&&(g.undefined(s.languageId)||g.string(s.languageId))&&g.uinteger(s.lineCount)&&g.func(s.getText)&&g.func(s.positionAt)&&g.func(s.offsetAt))}n.is=u;function i(r,s){for(var e=r.getText(),a=t(s,function(d,b){var w=d.range.start.line-b.range.start.line;return w===0?d.range.start.character-b.range.start.character:w}),o=e.length,h=a.length-1;h>=0;h--){var p=a[h],m=r.offsetAt(p.range.start),v=r.offsetAt(p.range.end);if(v<=o)e=e.substring(0,m)+p.newText+e.substring(v,e.length);else throw new Error("Overlapping edit");o=m}return e}n.applyEdits=i;function t(r,s){if(r.length<=1)return r;var e=r.length/2|0,a=r.slice(0,e),o=r.slice(e);t(a,s),t(o,s);for(var h=0,p=0,m=0;h<a.length&&p<o.length;){var v=s(a[h],o[p]);v<=0?r[m++]=a[h++]:r[m++]=o[p++]}for(;h<a.length;)r[m++]=a[h++];for(;p<o.length;)r[m++]=o[p++];return r}})(te||(te={}));var Pe=function(){function n(_,u,i,t){this._uri=_,this._languageId=u,this._version=i,this._content=t,this._lineOffsets=void 0}return Object.defineProperty(n.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),n.prototype.getText=function(_){if(_){var u=this.offsetAt(_.start),i=this.offsetAt(_.end);return this._content.substring(u,i)}return this._content},n.prototype.update=function(_,u){this._content=_.text,this._version=u,this._lineOffsets=void 0},n.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var _=[],u=this._content,i=!0,t=0;t<u.length;t++){i&&(_.push(t),i=!1);var r=u.charAt(t);i=r==="\r"||r===`
  2. `,r==="\r"&&t+1<u.length&&u.charAt(t+1)===`
  3. `&&t++}i&&u.length>0&&_.push(u.length),this._lineOffsets=_}return this._lineOffsets},n.prototype.positionAt=function(_){_=Math.max(Math.min(_,this._content.length),0);var u=this.getLineOffsets(),i=0,t=u.length;if(t===0)return Q.create(0,_);for(;i<t;){var r=Math.floor((i+t)/2);u[r]>_?t=r:i=r+1}var s=i-1;return Q.create(s,_-u[s])},n.prototype.offsetAt=function(_){var u=this.getLineOffsets();if(_.line>=u.length)return this._content.length;if(_.line<0)return 0;var i=u[_.line],t=_.line+1<u.length?u[_.line+1]:this._content.length;return Math.max(Math.min(i+_.character,t),i)},Object.defineProperty(n.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),n}(),g;(function(n){var _=Object.prototype.toString;function u(v){return typeof v<"u"}n.defined=u;function i(v){return typeof v>"u"}n.undefined=i;function t(v){return v===!0||v===!1}n.boolean=t;function r(v){return _.call(v)==="[object String]"}n.string=r;function s(v){return _.call(v)==="[object Number]"}n.number=s;function e(v,d,b){return _.call(v)==="[object Number]"&&d<=v&&v<=b}n.numberRange=e;function a(v){return _.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}n.integer=a;function o(v){return _.call(v)==="[object Number]"&&0<=v&&v<=2147483647}n.uinteger=o;function h(v){return _.call(v)==="[object Function]"}n.func=h;function p(v){return v!==null&&typeof v=="object"}n.objectLiteral=p;function m(v,d){return Array.isArray(v)&&v.every(d)}n.typedArray=m})(g||(g={}));var je=function(n,_,u){if(u||arguments.length===2)for(var i=0,t=_.length,r;i<t;i++)(r||!(i in _))&&(r||(r=Array.prototype.slice.call(_,0,i)),r[i]=_[i]);return n.concat(r||Array.prototype.slice.call(_))},ee=function(){function n(_,u,i,t){this._uri=_,this._languageId=u,this._version=i,this._content=t,this._lineOffsets=void 0}return Object.defineProperty(n.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),n.prototype.getText=function(_){if(_){var u=this.offsetAt(_.start),i=this.offsetAt(_.end);return this._content.substring(u,i)}return this._content},n.prototype.update=function(_,u){for(var i=0,t=_;i<t.length;i++){var r=t[i];if(n.isIncremental(r)){var s=pe(r.range),e=this.offsetAt(s.start),a=this.offsetAt(s.end);this._content=this._content.substring(0,e)+r.text+this._content.substring(a,this._content.length);var o=Math.max(s.start.line,0),h=Math.max(s.end.line,0),p=this._lineOffsets,m=ie(r.text,!1,e);if(h-o===m.length)for(var v=0,d=m.length;v<d;v++)p[v+o+1]=m[v];else m.length<1e4?p.splice.apply(p,je([o+1,h-o],m,!1)):this._lineOffsets=p=p.slice(0,o+1).concat(m,p.slice(h+1));var b=r.text.length-(a-e);if(b!==0)for(var v=o+1+m.length,d=p.length;v<d;v++)p[v]=p[v]+b}else if(n.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=u},n.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=ie(this._content,!0)),this._lineOffsets},n.prototype.positionAt=function(_){_=Math.max(Math.min(_,this._content.length),0);var u=this.getLineOffsets(),i=0,t=u.length;if(t===0)return{line:0,character:_};for(;i<t;){var r=Math.floor((i+t)/2);u[r]>_?t=r:i=r+1}var s=i-1;return{line:s,character:_-u[s]}},n.prototype.offsetAt=function(_){var u=this.getLineOffsets();if(_.line>=u.length)return this._content.length;if(_.line<0)return 0;var i=u[_.line],t=_.line+1<u.length?u[_.line+1]:this._content.length;return Math.max(Math.min(i+_.character,t),i)},Object.defineProperty(n.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),n.isIncremental=function(_){var u=_;return u!=null&&typeof u.text=="string"&&u.range!==void 0&&(u.rangeLength===void 0||typeof u.rangeLength=="number")},n.isFull=function(_){var u=_;return u!=null&&typeof u.text=="string"&&u.range===void 0&&u.rangeLength===void 0},n}(),ne;(function(n){function _(t,r,s,e){return new ee(t,r,s,e)}n.create=_;function u(t,r,s){if(t instanceof ee)return t.update(r,s),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=u;function i(t,r){for(var s=t.getText(),e=bt(r.map(Ie),function(d,b){var w=d.range.start.line-b.range.start.line;return w===0?d.range.start.character-b.range.start.character:w}),a=0,o=[],h=0,p=e;h<p.length;h++){var m=p[h],v=t.offsetAt(m.range.start);if(v<a)throw new Error("Overlapping edit");v>a&&o.push(s.substring(a,v)),m.newText.length&&o.push(m.newText),a=t.offsetAt(m.range.end)}return o.push(s.substr(a)),o.join("")}n.applyEdits=i})(ne||(ne={}));function bt(n,_){if(n.length<=1)return n;var u=n.length/2|0,i=n.slice(0,u),t=n.slice(u);bt(i,_),bt(t,_);for(var r=0,s=0,e=0;r<i.length&&s<t.length;){var a=_(i[r],t[s]);a<=0?n[e++]=i[r++]:n[e++]=t[s++]}for(;r<i.length;)n[e++]=i[r++];for(;s<t.length;)n[e++]=t[s++];return n}function ie(n,_,u){u===void 0&&(u=0);for(var i=_?[u]:[],t=0;t<n.length;t++){var r=n.charCodeAt(t);(r===13||r===10)&&(r===13&&t+1<n.length&&n.charCodeAt(t+1)===10&&t++,i.push(u+t+1))}return i}function pe(n){var _=n.start,u=n.end;return _.line>u.line||_.line===u.line&&_.character>u.character?{start:u,end:_}:n}function Ie(n){var _=pe(n.range);return _!==n.range?{newText:n.newText,range:_}:n}var re;(function(n){n[n.StartCommentTag=0]="StartCommentTag",n[n.Comment=1]="Comment",n[n.EndCommentTag=2]="EndCommentTag",n[n.StartTagOpen=3]="StartTagOpen",n[n.StartTagClose=4]="StartTagClose",n[n.StartTagSelfClose=5]="StartTagSelfClose",n[n.StartTag=6]="StartTag",n[n.EndTagOpen=7]="EndTagOpen",n[n.EndTagClose=8]="EndTagClose",n[n.EndTag=9]="EndTag",n[n.DelimiterAssign=10]="DelimiterAssign",n[n.AttributeName=11]="AttributeName",n[n.AttributeValue=12]="AttributeValue",n[n.StartDoctypeTag=13]="StartDoctypeTag",n[n.Doctype=14]="Doctype",n[n.EndDoctypeTag=15]="EndDoctypeTag",n[n.Content=16]="Content",n[n.Whitespace=17]="Whitespace",n[n.Unknown=18]="Unknown",n[n.Script=19]="Script",n[n.Styles=20]="Styles",n[n.EOS=21]="EOS"})(re||(re={}));var se;(function(n){n[n.WithinContent=0]="WithinContent",n[n.AfterOpeningStartTag=1]="AfterOpeningStartTag",n[n.AfterOpeningEndTag=2]="AfterOpeningEndTag",n[n.WithinDoctype=3]="WithinDoctype",n[n.WithinTag=4]="WithinTag",n[n.WithinEndTag=5]="WithinEndTag",n[n.WithinComment=6]="WithinComment",n[n.WithinScriptContent=7]="WithinScriptContent",n[n.WithinStyleContent=8]="WithinStyleContent",n[n.AfterAttributeName=9]="AfterAttributeName",n[n.BeforeAttributeValue=10]="BeforeAttributeValue"})(se||(se={}));var ae;(function(n){n.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Y.Markdown,Y.PlainText]}},hover:{contentFormat:[Y.Markdown,Y.PlainText]}}}})(ae||(ae={}));var oe;(function(n){n[n.Unknown=0]="Unknown",n[n.File=1]="File",n[n.Directory=2]="Directory",n[n.SymbolicLink=64]="SymbolicLink"})(oe||(oe={}));function _e(n,_){var u=0,i=n.length;if(i===0)return 0;for(;u<i;){var t=Math.floor((u+i)/2);_(n[t])?i=t:u=t+1}return u}(function(){function n(_,u,i,t){this.start=_,this.end=u,this.children=i,this.parent=t,this.closed=!1}return Object.defineProperty(n.prototype,"attributeNames",{get:function(){return this.attributes?Object.keys(this.attributes):[]},enumerable:!1,configurable:!0}),n.prototype.isSameTag=function(_){return this.tag===void 0?_===void 0:_!==void 0&&this.tag.length===_.length&&this.tag.toLowerCase()===_},Object.defineProperty(n.prototype,"firstChild",{get:function(){return this.children[0]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastChild",{get:function(){return this.children.length?this.children[this.children.length-1]:void 0},enumerable:!1,configurable:!0}),n.prototype.findNodeBefore=function(_){var u=_e(this.children,function(r){return _<=r.start})-1;if(u>=0){var i=this.children[u];if(_>i.start){if(_<i.end)return i.findNodeBefore(_);var t=i.lastChild;return t&&t.end===i.end?i.findNodeBefore(_):i}}return this},n.prototype.findNodeAt=function(_){var u=_e(this.children,function(t){return _<=t.start})-1;if(u>=0){var i=this.children[u];if(_>i.start&&_<=i.end)return i.findNodeAt(_)}return this},n})();(function(){var n=[,,function(i){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(e))return!0;return!1},t.prototype.set_indent=function(e,a){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,e.__items[0]===" "&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return this.__items.length===0},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var a=e.lastIndexOf(`
  4. `);a!==-1?this.__character_count=e.length-a:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e};function r(e,a){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),a=a||"",e.indent_level>0&&(a=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}r.prototype.get_indent_size=function(e,a){var o=this.__base_string_length;return a=a||0,e<0&&(o=0),o+=e*this.__indent_size,o+=a,o},r.prototype.get_indent_string=function(e,a){var o=this.__base_string;return a=a||0,e<0&&(e=0,o=""),a+=e*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},r.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var e=this.__cache.length,a=0,o="";this.__indent_size&&e>=this.__indent_size&&(a=Math.floor(e/this.__indent_size),e-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),e&&(o+=new Array(e+1).join(" ")),this.__cache.push(o)};function s(e,a){this.__indent_cache=new r(e,a),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(e,a){return this.__indent_cache.get_indent_string(e,a)},s.prototype.get_indent_size=function(e,a){return this.__indent_cache.get_indent_size(e,a)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(e){return this.is_empty()||!e&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(e){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
  5. `&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
  6. `);return e!==`
  7. `&&(o=o.replace(/[\n]/g,e)),o},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(e,a){return e=e||0,a=a||0,this.next_line.set_indent(e,a),this.__lines.length>1?(this.current_line.set_indent(e,a),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(e){for(var a=0;a<e.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(e){for(var a=this.__lines.length;e<a;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(e){for(e=e===void 0?!1:e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(e,a){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(e)!==0&&h.item(-1)!==a){this.__lines.splice(o+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},i.exports.Output=s},,,,function(i){function t(e,a){this.raw_options=r(e,a),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}t.prototype._get_array=function(e,a){var o=this.raw_options[e],h=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},t.prototype._get_boolean=function(e,a){var o=this.raw_options[e],h=o===void 0?!!a:!!o;return h},t.prototype._get_characters=function(e,a){var o=this.raw_options[e],h=a||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
  8. `).replace(/\\t/," ")),h},t.prototype._get_number=function(e,a){var o=this.raw_options[e];a=parseInt(a,10),isNaN(a)&&(a=0);var h=parseInt(o,10);return isNaN(h)&&(h=a),h},t.prototype._get_selection=function(e,a,o){var h=this._get_selection_list(e,a,o);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+e+`' can only be one of the following values:
  9. `+a+`
  10. You passed in: '`+this.raw_options[e]+"'");return h[0]},t.prototype._get_selection_list=function(e,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var h=this._get_array(e,o);if(!this._is_valid_selection(h,a))throw new Error("Invalid Option Value: The option '"+e+`' can contain only the following values:
  11. `+a+`
  12. You passed in: '`+this.raw_options[e]+"'");return h},t.prototype._is_valid_selection=function(e,a){return e.length&&a.length&&!e.some(function(o){return a.indexOf(o)===-1})};function r(e,a){var o={};e=s(e);var h;for(h in e)h!==a&&(o[h]=e[h]);if(a&&e[a])for(h in e[a])o[h]=e[a][h];return o}function s(e){var a={},o;for(o in e){var h=o.replace(/-/g,"_");a[h]=e[o]}return a}i.exports.Options=t,i.exports.normalizeOpts=s,i.exports.mergeOpts=r},,function(i){var t=RegExp.prototype.hasOwnProperty("sticky");function r(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},r.prototype.peek=function(s){var e=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(e=this.__input.charAt(s)),e},r.prototype.__match=function(s,e){s.lastIndex=e;var a=s.exec(this.__input);return a&&!(t&&s.sticky)&&a.index!==e&&(a=null),a},r.prototype.test=function(s,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length?!!this.__match(s,e):!1},r.prototype.testChar=function(s,e){var a=this.peek(e);return s.lastIndex=0,a!==null&&s.test(a)},r.prototype.match=function(s){var e=this.__match(s,this.__position);return e?this.__position+=e[0].length:e=null,e},r.prototype.read=function(s,e,a){var o="",h;return s&&(h=this.match(s),h&&(o+=h[0])),e&&(h||!s)&&(o+=this.readUntil(e,a)),o},r.prototype.readUntil=function(s,e){var a="",o=this.__position;s.lastIndex=this.__position;var h=s.exec(this.__input);return h?(o=h.index,e&&(o+=h[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},r.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},r.prototype.get_regexp=function(s,e){var a=null,o="g";return e&&t&&(o="y"),typeof s=="string"&&s!==""?a=new RegExp(s,o):s&&(a=new RegExp(s.source,o)),a},r.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(s){var e=this.__position,a=this.readUntilAfter(s);return this.__position=e,a},r.prototype.lookBack=function(s){var e=this.__position-1;return e>=s.length&&this.__input.substring(e-s.length,e).toLowerCase()===s},i.exports.InputScanner=r},,,,,function(i){function t(r,s){r=typeof r=="string"?r:r.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+s,"g")}t.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var e=this.__directive_pattern.exec(r);e;)s[e[1]]=e[2],e=this.__directive_pattern.exec(r);return s},t.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=t},,function(i,t,r){var s=r(16).Beautifier,e=r(17).Options;function a(o,h){var p=new s(o,h);return p.beautify()}i.exports=a,i.exports.defaultOptions=function(){return new e}},function(i,t,r){var s=r(17).Options,e=r(2).Output,a=r(8).InputScanner,o=r(13).Directives,h=new o(/\/\*/,/\*\//),p=/\r\n|[\r\n]/,m=/\r\n|[\r\n]/g,v=/\s/,d=/(?:\s|\n)+/g,b=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,w=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function E(C,j){this._source_text=C||"",this._options=new s(j),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}E.prototype.eatString=function(C){var j="";for(this._ch=this._input.next();this._ch;){if(j+=this._ch,this._ch==="\\")j+=this._input.next();else if(C.indexOf(this._ch)!==-1||this._ch===`
  13. `)break;this._ch=this._input.next()}return j},E.prototype.eatWhitespace=function(C){for(var j=v.test(this._input.peek()),B=0;v.test(this._input.peek());)this._ch=this._input.next(),C&&this._ch===`
  14. `&&(B===0||B<this._options.max_preserve_newlines)&&(B++,this._output.add_new_line(!0));return j},E.prototype.foundNestedPseudoClass=function(){for(var C=0,j=1,B=this._input.peek(j);B;){if(B==="{")return!0;if(B==="(")C+=1;else if(B===")"){if(C===0)return!1;C-=1}else if(B===";"||B==="}")return!1;j++,B=this._input.peek(j)}return!1},E.prototype.print_string=function(C){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(C)},E.prototype.preserveSingleSpace=function(C){C&&(this._output.space_before_token=!0)},E.prototype.indent=function(){this._indentLevel++},E.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,j=this._options.eol;j==="auto"&&(j=`
  15. `,C&&p.test(C||"")&&(j=C.match(p)[0])),C=C.replace(m,`
  16. `);var B=C.match(/^[\t ]*/)[0];this._output=new e(this._options,B),this._input=new a(C),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var G=0,l=!1,c=!1,f=!1,P=!1,T=!1,N=this._ch,D,L,R;D=this._input.read(d),L=D!=="",R=N,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),N=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var z=this._input.read(b),x=h.get_directives(z);x&&x.ignore==="start"&&(z+=h.readIgnored(this._input)),this.print_string(z),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(w)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(L),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var y=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);y.match(/[ :]$/)&&(y=this.eatString(": ").replace(/\s$/,""),this.print_string(y),this._output.space_before_token=!0),y=y.replace(/\s$/,""),y==="extend"?P=!0:y==="import"&&(T=!0),y in this.NESTED_AT_RULE?(this._nestedLevel+=1,y in this.CONDITIONAL_GROUP_RULE&&(f=!0)):!l&&G===0&&y.indexOf(":")!==-1&&(c=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(L),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(c&&(c=!1,this.outdent()),f?(f=!1,l=this._indentLevel>=this._nestedLevel):l=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&l&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),R==="{"&&this._output.trim(!0),T=!1,P=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),l=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(l||f)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!P&&G===0?(this.print_string(":"),c||(c=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(L),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?G===0?(c&&(this.outdent(),c=!1),P=!1,T=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),G++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),G&&(G--,this.outdent()))):(this.preserveSingleSpace(L),this.print_string(this._ch),this.eatWhitespace(),G++,this.indent()):this._ch===")"?(G&&(G--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!c&&G===0&&!T&&!P?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!c&&G===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&v.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(L),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),v.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(L),this.print_string(this._ch));var A=this._output.get_code(j);return A},i.exports.Beautifier=E},function(i,t,r){var s=r(6).Options;function e(a){s.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var p=0;p<h.length;p++)h[p]!=="expand"?this.brace_style="collapse":this.brace_style=h[p]}e.prototype=new s,i.exports.Options=e}],_={};function u(i){var t=_[i];if(t!==void 0)return t.exports;var r=_[i]={exports:{}};return n[i](r,r.exports,u),r.exports}u(15)})();(function(){var n=[,,function(i){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(e))return!0;return!1},t.prototype.set_indent=function(e,a){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,e.__items[0]===" "&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return this.__items.length===0},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var a=e.lastIndexOf(`
  17. `);a!==-1?this.__character_count=e.length-a:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e};function r(e,a){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),a=a||"",e.indent_level>0&&(a=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}r.prototype.get_indent_size=function(e,a){var o=this.__base_string_length;return a=a||0,e<0&&(o=0),o+=e*this.__indent_size,o+=a,o},r.prototype.get_indent_string=function(e,a){var o=this.__base_string;return a=a||0,e<0&&(e=0,o=""),a+=e*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},r.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var e=this.__cache.length,a=0,o="";this.__indent_size&&e>=this.__indent_size&&(a=Math.floor(e/this.__indent_size),e-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),e&&(o+=new Array(e+1).join(" ")),this.__cache.push(o)};function s(e,a){this.__indent_cache=new r(e,a),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(e,a){return this.__indent_cache.get_indent_string(e,a)},s.prototype.get_indent_size=function(e,a){return this.__indent_cache.get_indent_size(e,a)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(e){return this.is_empty()||!e&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(e){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
  18. `&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
  19. `);return e!==`
  20. `&&(o=o.replace(/[\n]/g,e)),o},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(e,a){return e=e||0,a=a||0,this.next_line.set_indent(e,a),this.__lines.length>1?(this.current_line.set_indent(e,a),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(e){for(var a=0;a<e.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(e){for(var a=this.__lines.length;e<a;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(e){for(e=e===void 0?!1:e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(e,a){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(e)!==0&&h.item(-1)!==a){this.__lines.splice(o+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},i.exports.Output=s},function(i){function t(r,s,e,a){this.type=r,this.text=s,this.comments_before=null,this.newlines=e||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=t},,,function(i){function t(e,a){this.raw_options=r(e,a),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}t.prototype._get_array=function(e,a){var o=this.raw_options[e],h=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},t.prototype._get_boolean=function(e,a){var o=this.raw_options[e],h=o===void 0?!!a:!!o;return h},t.prototype._get_characters=function(e,a){var o=this.raw_options[e],h=a||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
  21. `).replace(/\\t/," ")),h},t.prototype._get_number=function(e,a){var o=this.raw_options[e];a=parseInt(a,10),isNaN(a)&&(a=0);var h=parseInt(o,10);return isNaN(h)&&(h=a),h},t.prototype._get_selection=function(e,a,o){var h=this._get_selection_list(e,a,o);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+e+`' can only be one of the following values:
  22. `+a+`
  23. You passed in: '`+this.raw_options[e]+"'");return h[0]},t.prototype._get_selection_list=function(e,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var h=this._get_array(e,o);if(!this._is_valid_selection(h,a))throw new Error("Invalid Option Value: The option '"+e+`' can contain only the following values:
  24. `+a+`
  25. You passed in: '`+this.raw_options[e]+"'");return h},t.prototype._is_valid_selection=function(e,a){return e.length&&a.length&&!e.some(function(o){return a.indexOf(o)===-1})};function r(e,a){var o={};e=s(e);var h;for(h in e)h!==a&&(o[h]=e[h]);if(a&&e[a])for(h in e[a])o[h]=e[a][h];return o}function s(e){var a={},o;for(o in e){var h=o.replace(/-/g,"_");a[h]=e[o]}return a}i.exports.Options=t,i.exports.normalizeOpts=s,i.exports.mergeOpts=r},,function(i){var t=RegExp.prototype.hasOwnProperty("sticky");function r(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},r.prototype.peek=function(s){var e=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(e=this.__input.charAt(s)),e},r.prototype.__match=function(s,e){s.lastIndex=e;var a=s.exec(this.__input);return a&&!(t&&s.sticky)&&a.index!==e&&(a=null),a},r.prototype.test=function(s,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length?!!this.__match(s,e):!1},r.prototype.testChar=function(s,e){var a=this.peek(e);return s.lastIndex=0,a!==null&&s.test(a)},r.prototype.match=function(s){var e=this.__match(s,this.__position);return e?this.__position+=e[0].length:e=null,e},r.prototype.read=function(s,e,a){var o="",h;return s&&(h=this.match(s),h&&(o+=h[0])),e&&(h||!s)&&(o+=this.readUntil(e,a)),o},r.prototype.readUntil=function(s,e){var a="",o=this.__position;s.lastIndex=this.__position;var h=s.exec(this.__input);return h?(o=h.index,e&&(o+=h[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},r.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},r.prototype.get_regexp=function(s,e){var a=null,o="g";return e&&t&&(o="y"),typeof s=="string"&&s!==""?a=new RegExp(s,o):s&&(a=new RegExp(s.source,o)),a},r.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(s){var e=this.__position,a=this.readUntilAfter(s);return this.__position=e,a},r.prototype.lookBack=function(s){var e=this.__position-1;return e>=s.length&&this.__input.substring(e-s.length,e).toLowerCase()===s},i.exports.InputScanner=r},function(i,t,r){var s=r(8).InputScanner,e=r(3).Token,a=r(10).TokenStream,o=r(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},p=function(m,v){this._input=new s(m),this._options=v||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};p.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var m,v=new e(h.START,""),d=null,b=[],w=new a;v.type!==h.EOF;){for(m=this._get_next_token(v,d);this._is_comment(m);)w.add(m),m=this._get_next_token(v,d);w.isEmpty()||(m.comments_before=w,w=new a),m.parent=d,this._is_opening(m)?(b.push(d),d=m):d&&this._is_closing(m,d)&&(m.opened=d,d.closed=m,d=b.pop(),m.parent=d),m.previous=v,v.next=m,this.__tokens.add(m),v=m}return this.__tokens},p.prototype._is_first_token=function(){return this.__tokens.isEmpty()},p.prototype._reset=function(){},p.prototype._get_next_token=function(m,v){this._readWhitespace();var d=this._input.read(/.+/g);return d?this._create_token(h.RAW,d):this._create_token(h.EOF,"")},p.prototype._is_comment=function(m){return!1},p.prototype._is_opening=function(m){return!1},p.prototype._is_closing=function(m,v){return!1},p.prototype._create_token=function(m,v){var d=new e(m,v,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return d},p.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=p,i.exports.TOKEN=h},function(i){function t(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}t.prototype.restart=function(){this.__position=0},t.prototype.isEmpty=function(){return this.__tokens_length===0},t.prototype.hasNext=function(){return this.__position<this.__tokens_length},t.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},t.prototype.peek=function(r){var s=null;return r=r||0,r+=this.__position,r>=0&&r<this.__tokens_length&&(s=this.__tokens[r]),s},t.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},i.exports.TokenStream=t},function(i,t,r){var s=r(12).Pattern;function e(a,o){s.call(this,a,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}e.prototype=new s,e.prototype.__set_whitespace_patterns=function(a,o){a+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},e.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var a=this._input.read(this._match_pattern);if(a===" ")this.whitespace_before_token=" ";else if(a){var o=this.__split(this._newline_regexp,a);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return a},e.prototype.matching=function(a,o){var h=this._create();return h.__set_whitespace_patterns(a,o),h._update(),h},e.prototype._create=function(){return new e(this._input,this)},e.prototype.__split=function(a,o){a.lastIndex=0;for(var h=0,p=[],m=a.exec(o);m;)p.push(o.substring(h,m.index)),h=m.index+m[0].length,m=a.exec(o);return h<o.length?p.push(o.substring(h,o.length)):p.push(""),p},i.exports.WhitespacePattern=e},function(i){function t(r,s){this._input=r,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}t.prototype.read=function(){var r=this._input.read(this._starting_pattern);return(!this._starting_pattern||r)&&(r+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),r},t.prototype.read_match=function(){return this._input.match(this._match_pattern)},t.prototype.until_after=function(r){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(r),s._update(),s},t.prototype.until=function(r){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(r),s._update(),s},t.prototype.starting_with=function(r){var s=this._create();return s._starting_pattern=this._input.get_regexp(r,!0),s._update(),s},t.prototype.matching=function(r){var s=this._create();return s._match_pattern=this._input.get_regexp(r,!0),s._update(),s},t.prototype._create=function(){return new t(this._input,this)},t.prototype._update=function(){},i.exports.Pattern=t},function(i){function t(r,s){r=typeof r=="string"?r:r.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+s,"g")}t.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var e=this.__directive_pattern.exec(r);e;)s[e[1]]=e[2],e=this.__directive_pattern.exec(r);return s},t.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=t},function(i,t,r){var s=r(12).Pattern,e={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(o,h){s.call(this,o,h),this.__template_pattern=null,this._disabled=Object.assign({},e),this._excluded=Object.assign({},e),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var p=new s(o);this.__patterns={handlebars_comment:p.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:p.starting_with(/{{{/).until_after(/}}}/),handlebars:p.starting_with(/{{/).until_after(/}}/),php:p.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:p.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:p.starting_with(/{%/).until_after(/%}/),django_value:p.starting_with(/{{/).until_after(/}}/),django_comment:p.starting_with(/{#/).until_after(/#}/),smarty:p.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:p.starting_with(/{\*/).until_after(/\*}/),smarty_literal:p.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new s,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(o){var h=this._create();return h._disabled[o]=!0,h._update(),h},a.prototype.read_options=function(o){var h=this._create();for(var p in e)h._disabled[p]=o.templating.indexOf(p)===-1;return h._update(),h},a.prototype.exclude=function(o){var h=this._create();return h._excluded[o]=!0,h._update(),h},a.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),o+=h,h=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},a.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},a.prototype._read_template=function(){var o="",h=this._input.peek();if(h==="<"){var p=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&p==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&p==="%"&&(o=o||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},i.exports.TemplatablePattern=a},,,,function(i,t,r){var s=r(19).Beautifier,e=r(20).Options;function a(o,h,p,m){var v=new s(o,h,p,m);return v.beautify()}i.exports=a,i.exports.defaultOptions=function(){return new e}},function(i,t,r){var s=r(20).Options,e=r(2).Output,a=r(21).Tokenizer,o=r(21).TOKEN,h=/\r\n|[\r\n]/,p=/\r\n|[\r\n]/g,m=function(l,c){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=l.max_preserve_newlines,this.preserve_newlines=l.preserve_newlines,this._output=new e(l,c)};m.prototype.current_line_has_match=function(l){return this._output.current_line.has_match(l)},m.prototype.set_space_before_token=function(l,c){this._output.space_before_token=l,this._output.non_breaking_space=c},m.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},m.prototype.add_raw_token=function(l){this._output.add_raw_token(l)},m.prototype.print_preserved_newlines=function(l){var c=0;l.type!==o.TEXT&&l.previous.type!==o.TEXT&&(c=l.newlines?1:0),this.preserve_newlines&&(c=l.newlines<this.max_preserve_newlines+1?l.newlines:this.max_preserve_newlines+1);for(var f=0;f<c;f++)this.print_newline(f>0);return c!==0},m.prototype.traverse_whitespace=function(l){return l.whitespace_before||l.newlines?(this.print_preserved_newlines(l)||(this._output.space_before_token=!0),!0):!1},m.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},m.prototype.print_newline=function(l){this._output.add_new_line(l)},m.prototype.print_token=function(l){l.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(l.text))},m.prototype.indent=function(){this.indent_level++},m.prototype.get_full_indent=function(l){return l=this.indent_level+(l||0),l<1?"":this._output.get_indent_string(l)};var v=function(l){for(var c=null,f=l.next;f.type!==o.EOF&&l.closed!==f;){if(f.type===o.ATTRIBUTE&&f.text==="type"){f.next&&f.next.type===o.EQUALS&&f.next.next&&f.next.next.type===o.VALUE&&(c=f.next.next.text);break}f=f.next}return c},d=function(l,c){var f=null,P=null;return c.closed?(l==="script"?f="text/javascript":l==="style"&&(f="text/css"),f=v(c)||f,f.search("text/css")>-1?P="css":f.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?P="javascript":f.search(/(text|application|dojo)\/(x-)?(html)/)>-1?P="html":f.search(/test\/null/)>-1&&(P="null"),P):null};function b(l,c){return c.indexOf(l)!==-1}function w(l,c,f){this.parent=l||null,this.tag=c?c.tag_name:"",this.indent_level=f||0,this.parser_token=c||null}function E(l){this._printer=l,this._current_frame=null}E.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},E.prototype.record_tag=function(l){var c=new w(this._current_frame,l,this._printer.indent_level);this._current_frame=c},E.prototype._try_pop_frame=function(l){var c=null;return l&&(c=l.parser_token,this._printer.indent_level=l.indent_level,this._current_frame=l.parent),c},E.prototype._get_frame=function(l,c){for(var f=this._current_frame;f&&l.indexOf(f.tag)===-1;){if(c&&c.indexOf(f.tag)!==-1){f=null;break}f=f.parent}return f},E.prototype.try_pop=function(l,c){var f=this._get_frame([l],c);return this._try_pop_frame(f)},E.prototype.indent_to_tag=function(l){var c=this._get_frame(l);c&&(this._printer.indent_level=c.indent_level)};function C(l,c,f,P){this._source_text=l||"",c=c||{},this._js_beautify=f,this._css_beautify=P,this._tag_stack=null;var T=new s(c,"html");this._options=T,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var l=this._source_text,c=this._options.eol;this._options.eol==="auto"&&(c=`
  26. `,l&&h.test(l)&&(c=l.match(h)[0])),l=l.replace(p,`
  27. `);var f=l.match(/^[\t ]*/)[0],P={text:"",type:""},T=new j,N=new m(this._options,f),D=new a(l,this._options).tokenize();this._tag_stack=new E(N);for(var L=null,R=D.next();R.type!==o.EOF;)R.type===o.TAG_OPEN||R.type===o.COMMENT?(L=this._handle_tag_open(N,R,T,P),T=L):R.type===o.ATTRIBUTE||R.type===o.EQUALS||R.type===o.VALUE||R.type===o.TEXT&&!T.tag_complete?L=this._handle_inside_tag(N,R,T,D):R.type===o.TAG_CLOSE?L=this._handle_tag_close(N,R,T):R.type===o.TEXT?L=this._handle_text(N,R,T):N.add_raw_token(R),P=L,R=D.next();var z=N._output.get_code(c);return z},C.prototype._handle_tag_close=function(l,c,f){var P={text:c.text,type:c.type};return l.alignment_size=0,f.tag_complete=!0,l.set_space_before_token(c.newlines||c.whitespace_before!=="",!0),f.is_unformatted?l.add_raw_token(c):(f.tag_start_char==="<"&&(l.set_space_before_token(c.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&f.has_wrapped_attrs&&l.print_newline(!1)),l.print_token(c)),f.indent_content&&!(f.is_unformatted||f.is_content_unformatted)&&(l.indent(),f.indent_content=!1),!f.is_inline_element&&!(f.is_unformatted||f.is_content_unformatted)&&l.set_wrap_point(),P},C.prototype._handle_inside_tag=function(l,c,f,P){var T=f.has_wrapped_attrs,N={text:c.text,type:c.type};if(l.set_space_before_token(c.newlines||c.whitespace_before!=="",!0),f.is_unformatted)l.add_raw_token(c);else if(f.tag_start_char==="{"&&c.type===o.TEXT)l.print_preserved_newlines(c)?(c.newlines=0,l.add_raw_token(c)):l.print_token(c);else{if(c.type===o.ATTRIBUTE?(l.set_space_before_token(!0),f.attr_count+=1):(c.type===o.EQUALS||c.type===o.VALUE&&c.previous.type===o.EQUALS)&&l.set_space_before_token(!1),c.type===o.ATTRIBUTE&&f.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(l.traverse_whitespace(c),T=T||c.newlines!==0),this._is_wrap_attributes_force)){var D=f.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&f.attr_count===1){var L=!0,R=0,z;do{if(z=P.peek(R),z.type===o.ATTRIBUTE){L=!1;break}R+=1}while(R<4&&z.type!==o.EOF&&z.type!==o.TAG_CLOSE);D=!L}D&&(l.print_newline(!1),T=!0)}l.print_token(c),T=T||l.previous_token_wrapped(),f.has_wrapped_attrs=T}return N},C.prototype._handle_text=function(l,c,f){var P={text:c.text,type:"TK_CONTENT"};return f.custom_beautifier_name?this._print_custom_beatifier_text(l,c,f):f.is_unformatted||f.is_content_unformatted?l.add_raw_token(c):(l.traverse_whitespace(c),l.print_token(c)),P},C.prototype._print_custom_beatifier_text=function(l,c,f){var P=this;if(c.text!==""){var T=c.text,N,D=1,L="",R="";f.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?N=this._js_beautify:f.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?N=this._css_beautify:f.custom_beautifier_name==="html"&&(N=function(S,O){var I=new C(S,O,P._js_beautify,P._css_beautify);return I.beautify()}),this._options.indent_scripts==="keep"?D=0:this._options.indent_scripts==="separate"&&(D=-l.indent_level);var z=l.get_full_indent(D);if(T=T.replace(/\n[ \t]*$/,""),f.custom_beautifier_name!=="html"&&T[0]==="<"&&T.match(/^(<!--|<!\[CDATA\[)/)){var x=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(T);if(!x){l.add_raw_token(c);return}L=z+x[1]+`
  28. `,T=x[4],x[5]&&(R=z+x[5]),T=T.replace(/\n[ \t]*$/,""),(x[2]||x[3].indexOf(`
  29. `)!==-1)&&(x=x[3].match(/[ \t]+$/),x&&(c.whitespace_before=x[0]))}if(T)if(N){var y=function(){this.eol=`
  30. `};y.prototype=this._options.raw_options;var A=new y;T=N(z+T,A)}else{var k=c.whitespace_before;k&&(T=T.replace(new RegExp(`
  31. (`+k+")?","g"),`
  32. `)),T=z+T.replace(/\n/g,`
  33. `+z)}L&&(T?T=L+T+`
  34. `+R:T=L+R),l.print_newline(!1),T&&(c.text=T,c.whitespace_before="",c.newlines=0,l.add_raw_token(c),l.print_newline(!0))}},C.prototype._handle_tag_open=function(l,c,f,P){var T=this._get_tag_open_token(c);return(f.is_unformatted||f.is_content_unformatted)&&!f.is_empty_element&&c.type===o.TAG_OPEN&&c.text.indexOf("</")===0?(l.add_raw_token(c),T.start_tag_token=this._tag_stack.try_pop(T.tag_name)):(l.traverse_whitespace(c),this._set_tag_position(l,c,T,f,P),T.is_inline_element||l.set_wrap_point(),l.print_token(c)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(T.alignment_size=c.text.length+1),!T.tag_complete&&!T.is_unformatted&&(l.alignment_size=T.alignment_size),T};var j=function(l,c){if(this.parent=l||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!c)this.tag_complete=!0;else{var f;this.tag_start_char=c.text[0],this.text=c.text,this.tag_start_char==="<"?(f=c.text.match(/^<([^\s>]*)/),this.tag_check=f?f[1]:""):(f=c.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=f?f[1]:"",c.text==="{{#>"&&this.tag_check===">"&&c.next!==null&&(this.tag_check=c.next.text)),this.tag_check=this.tag_check.toLowerCase(),c.type===o.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||c.closed&&c.closed.text==="/>",this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))}};C.prototype._get_tag_open_token=function(l){var c=new j(this._tag_stack.get_parser_token(),l);return c.alignment_size=this._options.wrap_attributes_indent_size,c.is_end_tag=c.is_end_tag||b(c.tag_check,this._options.void_elements),c.is_empty_element=c.tag_complete||c.is_start_tag&&c.is_end_tag,c.is_unformatted=!c.tag_complete&&b(c.tag_check,this._options.unformatted),c.is_content_unformatted=!c.is_empty_element&&b(c.tag_check,this._options.content_unformatted),c.is_inline_element=b(c.tag_name,this._options.inline)||c.tag_start_char==="{",c},C.prototype._set_tag_position=function(l,c,f,P,T){if(f.is_empty_element||(f.is_end_tag?f.start_tag_token=this._tag_stack.try_pop(f.tag_name):(this._do_optional_end_element(f)&&(f.is_inline_element||l.print_newline(!1)),this._tag_stack.record_tag(f),(f.tag_name==="script"||f.tag_name==="style")&&!(f.is_unformatted||f.is_content_unformatted)&&(f.custom_beautifier_name=d(f.tag_check,c)))),b(f.tag_check,this._options.extra_liners)&&(l.print_newline(!1),l._output.just_added_blankline()||l.print_newline(!0)),f.is_empty_element){if(f.tag_start_char==="{"&&f.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),f.indent_content=!0;var N=l.current_line_has_match(/{{#if/);N||l.print_newline(!1)}f.tag_name==="!--"&&T.type===o.TAG_CLOSE&&P.is_end_tag&&f.text.indexOf(`
  35. `)===-1||(f.is_inline_element||f.is_unformatted||l.print_newline(!1),this._calcluate_parent_multiline(l,f))}else if(f.is_end_tag){var D=!1;D=f.start_tag_token&&f.start_tag_token.multiline_content,D=D||!f.is_inline_element&&!(P.is_inline_element||P.is_unformatted)&&!(T.type===o.TAG_CLOSE&&f.start_tag_token===P)&&T.type!=="TK_CONTENT",(f.is_content_unformatted||f.is_unformatted)&&(D=!1),D&&l.print_newline(!1)}else f.indent_content=!f.custom_beautifier_name,f.tag_start_char==="<"&&(f.tag_name==="html"?f.indent_content=this._options.indent_inner_html:f.tag_name==="head"?f.indent_content=this._options.indent_head_inner_html:f.tag_name==="body"&&(f.indent_content=this._options.indent_body_inner_html)),!(f.is_inline_element||f.is_unformatted)&&(T.type!=="TK_CONTENT"||f.is_content_unformatted)&&l.print_newline(!1),this._calcluate_parent_multiline(l,f)},C.prototype._calcluate_parent_multiline=function(l,c){c.parent&&l._output.just_added_newline()&&!((c.is_inline_element||c.is_unformatted)&&c.parent.is_inline_element)&&(c.parent.multiline_content=!0)};var B=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],G=["a","audio","del","ins","map","noscript","video"];C.prototype._do_optional_end_element=function(l){var c=null;if(!(l.is_empty_element||!l.is_start_tag||!l.parent)){if(l.tag_name==="body")c=c||this._tag_stack.try_pop("head");else if(l.tag_name==="li")c=c||this._tag_stack.try_pop("li",["ol","ul"]);else if(l.tag_name==="dd"||l.tag_name==="dt")c=c||this._tag_stack.try_pop("dt",["dl"]),c=c||this._tag_stack.try_pop("dd",["dl"]);else if(l.parent.tag_name==="p"&&B.indexOf(l.tag_name)!==-1){var f=l.parent.parent;(!f||G.indexOf(f.tag_name)===-1)&&(c=c||this._tag_stack.try_pop("p"))}else l.tag_name==="rp"||l.tag_name==="rt"?(c=c||this._tag_stack.try_pop("rt",["ruby","rtc"]),c=c||this._tag_stack.try_pop("rp",["ruby","rtc"])):l.tag_name==="optgroup"?c=c||this._tag_stack.try_pop("optgroup",["select"]):l.tag_name==="option"?c=c||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):l.tag_name==="colgroup"?c=c||this._tag_stack.try_pop("caption",["table"]):l.tag_name==="thead"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"])):l.tag_name==="tbody"||l.tag_name==="tfoot"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"]),c=c||this._tag_stack.try_pop("thead",["table"]),c=c||this._tag_stack.try_pop("tbody",["table"])):l.tag_name==="tr"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"]),c=c||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(l.tag_name==="th"||l.tag_name==="td")&&(c=c||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),c=c||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return l.parent=this._tag_stack.get_parser_token(),c}},i.exports.Beautifier=C},function(i,t,r){var s=r(6).Options;function e(a){s.call(this,a,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}e.prototype=new s,i.exports.Options=e},function(i,t,r){var s=r(9).Tokenizer,e=r(9).TOKEN,a=r(13).Directives,o=r(14).TemplatablePattern,h=r(12).Pattern,p={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},m=new a(/<\!--/,/-->/),v=function(d,b){s.call(this,d,b),this._current_tag_name="";var w=new o(this._input).read_options(this._options),E=new h(this._input);if(this.__patterns={word:w.until(/[\n\r\t <]/),single_quote:w.until_after(/'/),double_quote:w.until_after(/"/),attribute:w.until(/[\n\r\t =>]|\/>/),element_name:w.until(/[\n\r\t >\/]/),handlebars_comment:E.starting_with(/{{!--/).until_after(/--}}/),handlebars:E.starting_with(/{{/).until_after(/}}/),handlebars_open:E.until(/[\n\r\t }]/),handlebars_raw_close:E.until(/}}/),comment:E.starting_with(/<!--/).until_after(/-->/),cdata:E.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:E.starting_with(/<!\[/).until_after(/]>/),processing:E.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var C=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=E.matching(C).until_after(C)}};v.prototype=new s,v.prototype._is_comment=function(d){return!1},v.prototype._is_opening=function(d){return d.type===p.TAG_OPEN},v.prototype._is_closing=function(d,b){return d.type===p.TAG_CLOSE&&b&&((d.text===">"||d.text==="/>")&&b.text[0]==="<"||d.text==="}}"&&b.text[0]==="{"&&b.text[1]==="{")},v.prototype._reset=function(){this._current_tag_name=""},v.prototype._get_next_token=function(d,b){var w=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(p.EOF,""):(w=w||this._read_open_handlebars(E,b),w=w||this._read_attribute(E,d,b),w=w||this._read_close(E,b),w=w||this._read_raw_content(E,d,b),w=w||this._read_content_word(E),w=w||this._read_comment_or_cdata(E),w=w||this._read_processing(E),w=w||this._read_open(E,b),w=w||this._create_token(p.UNKNOWN,this._input.next()),w)},v.prototype._read_comment_or_cdata=function(d){var b=null,w=null,E=null;if(d==="<"){var C=this._input.peek(1);C==="!"&&(w=this.__patterns.comment.read(),w?(E=m.get_directives(w),E&&E.ignore==="start"&&(w+=m.readIgnored(this._input))):w=this.__patterns.cdata.read()),w&&(b=this._create_token(p.COMMENT,w),b.directives=E)}return b},v.prototype._read_processing=function(d){var b=null,w=null,E=null;if(d==="<"){var C=this._input.peek(1);(C==="!"||C==="?")&&(w=this.__patterns.conditional_comment.read(),w=w||this.__patterns.processing.read()),w&&(b=this._create_token(p.COMMENT,w),b.directives=E)}return b},v.prototype._read_open=function(d,b){var w=null,E=null;return b||d==="<"&&(w=this._input.next(),this._input.peek()==="/"&&(w+=this._input.next()),w+=this.__patterns.element_name.read(),E=this._create_token(p.TAG_OPEN,w)),E},v.prototype._read_open_handlebars=function(d,b){var w=null,E=null;return b||this._options.indent_handlebars&&d==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(w=this.__patterns.handlebars_comment.read(),w=w||this.__patterns.handlebars.read(),E=this._create_token(p.COMMENT,w)):(w=this.__patterns.handlebars_open.read(),E=this._create_token(p.TAG_OPEN,w))),E},v.prototype._read_close=function(d,b){var w=null,E=null;return b&&(b.text[0]==="<"&&(d===">"||d==="/"&&this._input.peek(1)===">")?(w=this._input.next(),d==="/"&&(w+=this._input.next()),E=this._create_token(p.TAG_CLOSE,w)):b.text[0]==="{"&&d==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),E=this._create_token(p.TAG_CLOSE,"}}"))),E},v.prototype._read_attribute=function(d,b,w){var E=null,C="";if(w&&w.text[0]==="<")if(d==="=")E=this._create_token(p.EQUALS,this._input.next());else if(d==='"'||d==="'"){var j=this._input.next();d==='"'?j+=this.__patterns.double_quote.read():j+=this.__patterns.single_quote.read(),E=this._create_token(p.VALUE,j)}else C=this.__patterns.attribute.read(),C&&(b.type===p.EQUALS?E=this._create_token(p.VALUE,C):E=this._create_token(p.ATTRIBUTE,C));return E},v.prototype._is_content_unformatted=function(d){return this._options.void_elements.indexOf(d)===-1&&(this._options.content_unformatted.indexOf(d)!==-1||this._options.unformatted.indexOf(d)!==-1)},v.prototype._read_raw_content=function(d,b,w){var E="";if(w&&w.text[0]==="{")E=this.__patterns.handlebars_raw_close.read();else if(b.type===p.TAG_CLOSE&&b.opened.text[0]==="<"&&b.text[0]!=="/"){var C=b.opened.text.substr(1).toLowerCase();if(C==="script"||C==="style"){var j=this._read_comment_or_cdata(d);if(j)return j.type=p.TEXT,j;E=this._input.readUntil(new RegExp("</"+C+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(C)&&(E=this._input.readUntil(new RegExp("</"+C+"[\\n\\r\\t ]*?>","ig")))}return E?this._create_token(p.TEXT,E):null},v.prototype._read_content_word=function(d){var b="";if(this._options.unformatted_content_delimiter&&d===this._options.unformatted_content_delimiter[0]&&(b=this.__patterns.unformatted_content_delimiter.read()),b||(b=this.__patterns.word.read()),b)return this._create_token(p.TEXT,b)},i.exports.Tokenizer=v,i.exports.TOKEN=p}],_={};function u(i){var t=_[i];if(t!==void 0)return t.exports;var r=_[i]={exports:{}};return n[i](r,r.exports,u),r.exports}u(18)})();(()=>{var n={470:i=>{function t(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,a){for(var o,h="",p=0,m=-1,v=0,d=0;d<=e.length;++d){if(d<e.length)o=e.charCodeAt(d);else{if(o===47)break;o=47}if(o===47){if(!(m===d-1||v===1))if(m!==d-1&&v===2){if(h.length<2||p!==2||h.charCodeAt(h.length-1)!==46||h.charCodeAt(h.length-2)!==46){if(h.length>2){var b=h.lastIndexOf("/");if(b!==h.length-1){b===-1?(h="",p=0):p=(h=h.slice(0,b)).length-1-h.lastIndexOf("/"),m=d,v=0;continue}}else if(h.length===2||h.length===1){h="",p=0,m=d,v=0;continue}}a&&(h.length>0?h+="/..":h="..",p=2)}else h.length>0?h+="/"+e.slice(m+1,d):h=e.slice(m+1,d),p=d-m-1;m=d,v=0}else o===46&&v!==-1?++v:v=-1}return h}var s={resolve:function(){for(var e,a="",o=!1,h=arguments.length-1;h>=-1&&!o;h--){var p;h>=0?p=arguments[h]:(e===void 0&&(e=process.cwd()),p=e),t(p),p.length!==0&&(a=p+"/"+a,o=p.charCodeAt(0)===47)}return a=r(a,!o),o?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(e){if(t(e),e.length===0)return".";var a=e.charCodeAt(0)===47,o=e.charCodeAt(e.length-1)===47;return(e=r(e,!a)).length!==0||a||(e="."),e.length>0&&o&&(e+="/"),a?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,a=0;a<arguments.length;++a){var o=arguments[a];t(o),o.length>0&&(e===void 0?e=o:e+="/"+o)}return e===void 0?".":s.normalize(e)},relative:function(e,a){if(t(e),t(a),e===a||(e=s.resolve(e))===(a=s.resolve(a)))return"";for(var o=1;o<e.length&&e.charCodeAt(o)===47;++o);for(var h=e.length,p=h-o,m=1;m<a.length&&a.charCodeAt(m)===47;++m);for(var v=a.length-m,d=p<v?p:v,b=-1,w=0;w<=d;++w){if(w===d){if(v>d){if(a.charCodeAt(m+w)===47)return a.slice(m+w+1);if(w===0)return a.slice(m+w)}else p>d&&(e.charCodeAt(o+w)===47?b=w:w===0&&(b=0));break}var E=e.charCodeAt(o+w);if(E!==a.charCodeAt(m+w))break;E===47&&(b=w)}var C="";for(w=o+b+1;w<=h;++w)w!==h&&e.charCodeAt(w)!==47||(C.length===0?C+="..":C+="/..");return C.length>0?C+a.slice(m+b):(m+=b,a.charCodeAt(m)===47&&++m,a.slice(m))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return".";for(var a=e.charCodeAt(0),o=a===47,h=-1,p=!0,m=e.length-1;m>=1;--m)if((a=e.charCodeAt(m))===47){if(!p){h=m;break}}else p=!1;return h===-1?o?"/":".":o&&h===1?"//":e.slice(0,h)},basename:function(e,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');t(e);var o,h=0,p=-1,m=!0;if(a!==void 0&&a.length>0&&a.length<=e.length){if(a.length===e.length&&a===e)return"";var v=a.length-1,d=-1;for(o=e.length-1;o>=0;--o){var b=e.charCodeAt(o);if(b===47){if(!m){h=o+1;break}}else d===-1&&(m=!1,d=o+1),v>=0&&(b===a.charCodeAt(v)?--v==-1&&(p=o):(v=-1,p=d))}return h===p?p=d:p===-1&&(p=e.length),e.slice(h,p)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!m){h=o+1;break}}else p===-1&&(m=!1,p=o+1);return p===-1?"":e.slice(h,p)},extname:function(e){t(e);for(var a=-1,o=0,h=-1,p=!0,m=0,v=e.length-1;v>=0;--v){var d=e.charCodeAt(v);if(d!==47)h===-1&&(p=!1,h=v+1),d===46?a===-1?a=v:m!==1&&(m=1):a!==-1&&(m=-1);else if(!p){o=v+1;break}}return a===-1||h===-1||m===0||m===1&&a===h-1&&a===o+1?"":e.slice(a,h)},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 function(a,o){var h=o.dir||o.root,p=o.base||(o.name||"")+(o.ext||"");return h?h===o.root?h+p:h+"/"+p:p}(0,e)},parse:function(e){t(e);var a={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return a;var o,h=e.charCodeAt(0),p=h===47;p?(a.root="/",o=1):o=0;for(var m=-1,v=0,d=-1,b=!0,w=e.length-1,E=0;w>=o;--w)if((h=e.charCodeAt(w))!==47)d===-1&&(b=!1,d=w+1),h===46?m===-1?m=w:E!==1&&(E=1):m!==-1&&(E=-1);else if(!b){v=w+1;break}return m===-1||d===-1||E===0||E===1&&m===d-1&&m===v+1?d!==-1&&(a.base=a.name=v===0&&p?e.slice(1,d):e.slice(v,d)):(v===0&&p?(a.name=e.slice(1,m),a.base=e.slice(1,d)):(a.name=e.slice(v,m),a.base=e.slice(v,d)),a.ext=e.slice(m,d)),v>0?a.dir=e.slice(0,v-1):p&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,i.exports=s},447:(i,t,r)=>{var s;if(r.r(t),r.d(t,{URI:()=>E,Utils:()=>D}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var e=navigator.userAgent;s=e.indexOf("Windows")>=0}var a,o,h=(a=function(x,y){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,k){A.__proto__=k}||function(A,k){for(var S in k)Object.prototype.hasOwnProperty.call(k,S)&&(A[S]=k[S])})(x,y)},function(x,y){function A(){this.constructor=x}a(x,y),x.prototype=y===null?Object.create(y):(A.prototype=y.prototype,new A)}),p=/^\w[\w\d+.-]*$/,m=/^\//,v=/^\/\//,d="",b="/",w=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,E=function(){function x(y,A,k,S,O,I){I===void 0&&(I=!1),typeof y=="object"?(this.scheme=y.scheme||d,this.authority=y.authority||d,this.path=y.path||d,this.query=y.query||d,this.fragment=y.fragment||d):(this.scheme=function(W,H){return W||H?W:"file"}(y,I),this.authority=A||d,this.path=function(W,H){switch(W){case"https":case"http":case"file":H?H[0]!==b&&(H=b+H):H=b}return H}(this.scheme,k||d),this.query=S||d,this.fragment=O||d,function(W,H){if(!W.scheme&&H)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+W.authority+'", path: "'+W.path+'", query: "'+W.query+'", fragment: "'+W.fragment+'"}');if(W.scheme&&!p.test(W.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(W.path){if(W.authority){if(!m.test(W.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(v.test(W.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,I))}return x.isUri=function(y){return y instanceof x||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="function"&&typeof y.with=="function"&&typeof y.toString=="function"},Object.defineProperty(x.prototype,"fsPath",{get:function(){return c(this)},enumerable:!1,configurable:!0}),x.prototype.with=function(y){if(!y)return this;var A=y.scheme,k=y.authority,S=y.path,O=y.query,I=y.fragment;return A===void 0?A=this.scheme:A===null&&(A=d),k===void 0?k=this.authority:k===null&&(k=d),S===void 0?S=this.path:S===null&&(S=d),O===void 0?O=this.query:O===null&&(O=d),I===void 0?I=this.fragment:I===null&&(I=d),A===this.scheme&&k===this.authority&&S===this.path&&O===this.query&&I===this.fragment?this:new j(A,k,S,O,I)},x.parse=function(y,A){A===void 0&&(A=!1);var k=w.exec(y);return k?new j(k[2]||d,N(k[4]||d),N(k[5]||d),N(k[7]||d),N(k[9]||d),A):new j(d,d,d,d,d)},x.file=function(y){var A=d;if(s&&(y=y.replace(/\\/g,b)),y[0]===b&&y[1]===b){var k=y.indexOf(b,2);k===-1?(A=y.substring(2),y=b):(A=y.substring(2,k),y=y.substring(k)||b)}return new j("file",A,y,d,d)},x.from=function(y){return new j(y.scheme,y.authority,y.path,y.query,y.fragment)},x.prototype.toString=function(y){return y===void 0&&(y=!1),f(this,y)},x.prototype.toJSON=function(){return this},x.revive=function(y){if(y){if(y instanceof x)return y;var A=new j(y);return A._formatted=y.external,A._fsPath=y._sep===C?y.fsPath:null,A}return y},x}(),C=s?1:void 0,j=function(x){function y(){var A=x!==null&&x.apply(this,arguments)||this;return A._formatted=null,A._fsPath=null,A}return h(y,x),Object.defineProperty(y.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=c(this)),this._fsPath},enumerable:!1,configurable:!0}),y.prototype.toString=function(A){return A===void 0&&(A=!1),A?f(this,!0):(this._formatted||(this._formatted=f(this,!1)),this._formatted)},y.prototype.toJSON=function(){var A={$mid:1};return this._fsPath&&(A.fsPath=this._fsPath,A._sep=C),this._formatted&&(A.external=this._formatted),this.path&&(A.path=this.path),this.scheme&&(A.scheme=this.scheme),this.authority&&(A.authority=this.authority),this.query&&(A.query=this.query),this.fragment&&(A.fragment=this.fragment),A},y}(E),B=((o={})[58]="%3A",o[47]="%2F",o[63]="%3F",o[35]="%23",o[91]="%5B",o[93]="%5D",o[64]="%40",o[33]="%21",o[36]="%24",o[38]="%26",o[39]="%27",o[40]="%28",o[41]="%29",o[42]="%2A",o[43]="%2B",o[44]="%2C",o[59]="%3B",o[61]="%3D",o[32]="%20",o);function G(x,y){for(var A=void 0,k=-1,S=0;S<x.length;S++){var O=x.charCodeAt(S);if(O>=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||y&&O===47)k!==-1&&(A+=encodeURIComponent(x.substring(k,S)),k=-1),A!==void 0&&(A+=x.charAt(S));else{A===void 0&&(A=x.substr(0,S));var I=B[O];I!==void 0?(k!==-1&&(A+=encodeURIComponent(x.substring(k,S)),k=-1),A+=I):k===-1&&(k=S)}}return k!==-1&&(A+=encodeURIComponent(x.substring(k))),A!==void 0?A:x}function l(x){for(var y=void 0,A=0;A<x.length;A++){var k=x.charCodeAt(A);k===35||k===63?(y===void 0&&(y=x.substr(0,A)),y+=B[k]):y!==void 0&&(y+=x[A])}return y!==void 0?y:x}function c(x,y){var A;return A=x.authority&&x.path.length>1&&x.scheme==="file"?"//"+x.authority+x.path:x.path.charCodeAt(0)===47&&(x.path.charCodeAt(1)>=65&&x.path.charCodeAt(1)<=90||x.path.charCodeAt(1)>=97&&x.path.charCodeAt(1)<=122)&&x.path.charCodeAt(2)===58?x.path[1].toLowerCase()+x.path.substr(2):x.path,s&&(A=A.replace(/\//g,"\\")),A}function f(x,y){var A=y?l:G,k="",S=x.scheme,O=x.authority,I=x.path,W=x.query,H=x.fragment;if(S&&(k+=S,k+=":"),(O||S==="file")&&(k+=b,k+=b),O){var q=O.indexOf("@");if(q!==-1){var _t=O.substr(0,q);O=O.substr(q+1),(q=_t.indexOf(":"))===-1?k+=A(_t,!1):(k+=A(_t.substr(0,q),!1),k+=":",k+=A(_t.substr(q+1),!1)),k+="@"}(q=(O=O.toLowerCase()).indexOf(":"))===-1?k+=A(O,!1):(k+=A(O.substr(0,q),!1),k+=O.substr(q))}if(I){if(I.length>=3&&I.charCodeAt(0)===47&&I.charCodeAt(2)===58)(tt=I.charCodeAt(1))>=65&&tt<=90&&(I="/"+String.fromCharCode(tt+32)+":"+I.substr(3));else if(I.length>=2&&I.charCodeAt(1)===58){var tt;(tt=I.charCodeAt(0))>=65&&tt<=90&&(I=String.fromCharCode(tt+32)+":"+I.substr(2))}k+=A(I,!0)}return W&&(k+="?",k+=A(W,!1)),H&&(k+="#",k+=y?H:G(H,!1)),k}function P(x){try{return decodeURIComponent(x)}catch{return x.length>3?x.substr(0,3)+P(x.substr(3)):x}}var T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(x){return x.match(T)?x.replace(T,function(y){return P(y)}):x}var D,L=r(470),R=function(){for(var x=0,y=0,A=arguments.length;y<A;y++)x+=arguments[y].length;var k=Array(x),S=0;for(y=0;y<A;y++)for(var O=arguments[y],I=0,W=O.length;I<W;I++,S++)k[S]=O[I];return k},z=L.posix||L;(function(x){x.joinPath=function(y){for(var A=[],k=1;k<arguments.length;k++)A[k-1]=arguments[k];return y.with({path:z.join.apply(z,R([y.path],A))})},x.resolvePath=function(y){for(var A=[],k=1;k<arguments.length;k++)A[k-1]=arguments[k];var S=y.path||"/";return y.with({path:z.resolve.apply(z,R([S],A))})},x.dirname=function(y){var A=z.dirname(y.path);return A.length===1&&A.charCodeAt(0)===46?y:y.with({path:A})},x.basename=function(y){return z.basename(y.path)},x.extname=function(y){return z.extname(y.path)}})(D||(D={}))}},_={};function u(i){if(_[i])return _[i].exports;var t=_[i]={exports:{}};return n[i](t,t.exports,u),t.exports}return u.d=(i,t)=>{for(var r in t)u.o(t,r)&&!u.o(i,r)&&Object.defineProperty(i,r,{enumerable:!0,get:t[r]})},u.o=(i,t)=>Object.prototype.hasOwnProperty.call(i,t),u.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},u(447)})();function K(n){if(n)return{character:n.column-1,line:n.lineNumber-1}}function Se(n){if(n)return{start:K(n.getStartPosition()),end:K(n.getEndPosition())}}function X(n){if(n)return new ce(n.start.line+1,n.start.character+1,n.end.line+1,n.end.character+1)}function Re(n){return typeof n.insert<"u"&&typeof n.replace<"u"}function Ue(n){var _=U.CompletionItemKind;switch(n){case M.Text:return _.Text;case M.Method:return _.Method;case M.Function:return _.Function;case M.Constructor:return _.Constructor;case M.Field:return _.Field;case M.Variable:return _.Variable;case M.Class:return _.Class;case M.Interface:return _.Interface;case M.Module:return _.Module;case M.Property:return _.Property;case M.Unit:return _.Unit;case M.Value:return _.Value;case M.Enum:return _.Enum;case M.Keyword:return _.Keyword;case M.Snippet:return _.Snippet;case M.Color:return _.Color;case M.File:return _.File;case M.Reference:return _.Reference}return _.Property}function xt(n){if(n)return{range:X(n.range),text:n.newText}}function Ne(n){return n&&n.command==="editor.action.triggerSuggest"?{id:n.command,title:n.title,arguments:n.arguments}:void 0}var fe=function(){function n(_){this._worker=_}return Object.defineProperty(n.prototype,"triggerCharacters",{get:function(){return[".",":","<",'"',"=","/"]},enumerable:!1,configurable:!0}),n.prototype.provideCompletionItems=function(_,u,i,t){var r=_.uri;return this._worker(r).then(function(s){return s.doComplete(r.toString(),K(u))}).then(function(s){if(s){var e=_.getWordUntilPosition(u),a=new ce(u.lineNumber,e.startColumn,u.lineNumber,e.endColumn),o=s.items.map(function(h){var p={label:h.label,insertText:h.insertText||h.label,sortText:h.sortText,filterText:h.filterText,documentation:h.documentation,command:Ne(h.command),detail:h.detail,range:a,kind:Ue(h.kind)};return h.textEdit&&(Re(h.textEdit)?p.range={insert:X(h.textEdit.insert),replace:X(h.textEdit.replace)}:p.range=X(h.textEdit.range),p.insertText=h.textEdit.newText),h.additionalTextEdits&&(p.additionalTextEdits=h.additionalTextEdits.map(xt)),h.insertTextFormat===wt.Snippet&&(p.insertTextRules=U.CompletionItemInsertTextRule.InsertAsSnippet),p});return{isIncomplete:s.isIncomplete,suggestions:o}}})},n}();function Le(n){return n&&typeof n=="object"&&typeof n.kind=="string"}function ue(n){return typeof n=="string"?{value:n}:Le(n)?n.kind==="plaintext"?{value:n.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:n.value}:{value:"```"+n.language+`
  36. `+n.value+"\n```\n"}}function ze(n){if(n)return Array.isArray(n)?n.map(ue):[ue(n)]}var de=function(){function n(_){this._worker=_}return n.prototype.provideHover=function(_,u,i){var t=_.uri;return this._worker(t).then(function(r){return r.doHover(t.toString(),K(u))}).then(function(r){if(r)return{range:X(r.range),contents:ze(r.contents)}})},n}();function De(n){var _=U.DocumentHighlightKind;switch(n){case it.Read:return _.Read;case it.Write:return _.Write;case it.Text:return _.Text}return _.Text}var ge=function(){function n(_){this._worker=_}return n.prototype.provideDocumentHighlights=function(_,u,i){var t=_.uri;return this._worker(t).then(function(r){return r.findDocumentHighlights(t.toString(),K(u))}).then(function(r){if(r)return r.map(function(s){return{range:X(s.range),kind:De(s.kind)}})})},n}();function We(n){var _=U.SymbolKind;switch(n){case F.File:return _.Array;case F.Module:return _.Module;case F.Namespace:return _.Namespace;case F.Package:return _.Package;case F.Class:return _.Class;case F.Method:return _.Method;case F.Property:return _.Property;case F.Field:return _.Field;case F.Constructor:return _.Constructor;case F.Enum:return _.Enum;case F.Interface:return _.Interface;case F.Function:return _.Function;case F.Variable:return _.Variable;case F.Constant:return _.Constant;case F.String:return _.String;case F.Number:return _.Number;case F.Boolean:return _.Boolean;case F.Array:return _.Array}return _.Function}var ve=function(){function n(_){this._worker=_}return n.prototype.provideDocumentSymbols=function(_,u){var i=_.uri;return this._worker(i).then(function(t){return t.findDocumentSymbols(i.toString())}).then(function(t){if(t)return t.map(function(r){return{name:r.name,detail:"",containerName:r.containerName,kind:We(r.kind),tags:[],range:X(r.location.range),selectionRange:X(r.location.range)}})})},n}(),me=function(){function n(_){this._worker=_}return n.prototype.provideLinks=function(_,u){var i=_.uri;return this._worker(i).then(function(t){return t.findDocumentLinks(i.toString())}).then(function(t){if(t)return{links:t.map(function(r){return{range:X(r.range),url:r.target}})}})},n}();function ye(n){return{tabSize:n.tabSize,insertSpaces:n.insertSpaces}}var we=function(){function n(_){this._worker=_}return n.prototype.provideDocumentFormattingEdits=function(_,u,i){var t=_.uri;return this._worker(t).then(function(r){return r.format(t.toString(),null,ye(u)).then(function(s){if(!(!s||s.length===0))return s.map(xt)})})},n}(),be=function(){function n(_){this._worker=_}return n.prototype.provideDocumentRangeFormattingEdits=function(_,u,i,t){var r=_.uri;return this._worker(r).then(function(s){return s.format(r.toString(),Se(u),ye(i)).then(function(e){if(!(!e||e.length===0))return e.map(xt)})})},n}(),xe=function(){function n(_){this._worker=_}return n.prototype.provideRenameEdits=function(_,u,i,t){var r=_.uri;return this._worker(r).then(function(s){return s.doRename(r.toString(),K(u),i)}).then(function(s){return Me(s)})},n}();function Me(n){if(!(!n||!n.changes)){var _=[];for(var u in n.changes)for(var i=Te.parse(u),t=0,r=n.changes[u];t<r.length;t++){var s=r[t];_.push({resource:i,edit:{range:X(s.range),text:s.newText}})}return{edits:_}}}var Ae=function(){function n(_){this._worker=_}return n.prototype.provideFoldingRanges=function(_,u,i){var t=_.uri;return this._worker(t).then(function(r){return r.getFoldingRanges(t.toString(),u)}).then(function(r){if(r)return r.map(function(s){var e={start:s.startLine+1,end:s.endLine+1};return typeof s.kind<"u"&&(e.kind=Fe(s.kind)),e})})},n}();function Fe(n){switch(n){case nt.Comment:return U.FoldingRangeKind.Comment;case nt.Imports:return U.FoldingRangeKind.Imports;case nt.Region:return U.FoldingRangeKind.Region}}var Ee=function(){function n(_){this._worker=_}return n.prototype.provideSelectionRanges=function(_,u,i){var t=_.uri;return this._worker(t).then(function(r){return r.getSelectionRanges(t.toString(),u.map(K))}).then(function(r){if(r)return r.map(function(s){for(var e=[];s;)e.push({range:X(s.range)}),s=s.parent;return e})})},n}();function Ve(n){var _=new le(n),u=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return _.getLanguageServiceWorker.apply(_,t)},i=n.languageId;U.registerCompletionItemProvider(i,new fe(u)),U.registerHoverProvider(i,new de(u)),U.registerDocumentHighlightProvider(i,new ge(u)),U.registerLinkProvider(i,new me(u)),U.registerFoldingRangeProvider(i,new Ae(u)),U.registerDocumentSymbolProvider(i,new ve(u)),U.registerSelectionRangeProvider(i,new Ee(u)),U.registerRenameProvider(i,new xe(u)),i==="html"&&(U.registerDocumentFormattingEditProvider(i,new we(u)),U.registerDocumentRangeFormattingEditProvider(i,new be(u)))}function Ge(n){var _=[],u=[],i=new le(n);_.push(i);var t=function(){for(var s=[],e=0;e<arguments.length;e++)s[e]=arguments[e];return i.getLanguageServiceWorker.apply(i,s)};function r(){var s=n.languageId,e=n.modeConfiguration;ke(u),e.completionItems&&u.push(U.registerCompletionItemProvider(s,new fe(t))),e.hovers&&u.push(U.registerHoverProvider(s,new de(t))),e.documentHighlights&&u.push(U.registerDocumentHighlightProvider(s,new ge(t))),e.links&&u.push(U.registerLinkProvider(s,new me(t))),e.documentSymbols&&u.push(U.registerDocumentSymbolProvider(s,new ve(t))),e.rename&&u.push(U.registerRenameProvider(s,new xe(t))),e.foldingRanges&&u.push(U.registerFoldingRangeProvider(s,new Ae(t))),e.selectionRanges&&u.push(U.registerSelectionRangeProvider(s,new Ee(t))),e.documentFormattingEdits&&u.push(U.registerDocumentFormattingEditProvider(s,new we(t))),e.documentRangeFormattingEdits&&u.push(U.registerDocumentRangeFormattingEditProvider(s,new be(t)))}return r(),_.push(he(u)),he(_)}function he(n){return{dispose:function(){return ke(n)}}}function ke(n){for(;n.length;)n.pop().dispose()}export{Ge as setupMode,Ve as setupMode1};