(function(){"use strict";class lo{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?new Error(e.message+` `+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const co=new lo;function ho(t){po(t)||co.onUnexpectedError(t)}function hi(t){if(t instanceof Error){let{name:e,message:n}=t;const r=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:r}}return t}const di="Canceled";function po(t){return t instanceof Error&&t.name===di&&t.message===di}var In;(function(t){function e(v){return v&&typeof v=="object"&&typeof v[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*i(v){yield v}t.single=i;function s(v){return v||n}t.from=s;function a(v){return!v||v[Symbol.iterator]().next().done===!0}t.isEmpty=a;function o(v){return v[Symbol.iterator]().next().value}t.first=o;function c(v,y){for(const k of v)if(y(k))return!0;return!1}t.some=c;function l(v,y){for(const k of v)if(y(k))return k}t.find=l;function*d(v,y){for(const k of v)y(k)&&(yield k)}t.filter=d;function*p(v,y){let k=0;for(const F of v)yield y(F,k++)}t.map=p;function*u(...v){for(const y of v)for(const k of y)yield k}t.concat=u;function*m(v){for(const y of v)for(const k of y)yield k}t.concatNested=m;function g(v,y,k){let F=k;for(const I of v)F=y(F,I);return F}t.reduce=g;function*x(v,y,k=v.length){for(y<0&&(y+=v.length),k<0?k+=v.length:k>v.length&&(k=v.length);yF===I){const F=v[Symbol.iterator](),I=y[Symbol.iterator]();for(;;){const T=F.next(),P=I.next();if(T.done!==P.done)return!1;if(T.done)return!0;if(!k(T.value,P.value))return!1}}t.equals=D})(In||(In={}));function uo(t){}function Jh(t){return t}class mo extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function pi(t){if(In.is(t)){let e=[];for(const n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new mo(e);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function fo(...t){return t.forEach(uo),go(()=>pi(t))}function go(t){return{dispose:()=>{t()}}}class Et{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{pi(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Et.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}Et.DISABLE_DISPOSED_WARNING=!1;class ui{constructor(){this._store=new Et}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}ui.None=Object.freeze({dispose(){}});var Tn;const Zt="en";let Ln=!1,Wn=!1,On=!1,Kt,Un=Zt,bo,Ke;const pe=typeof self=="object"?self:typeof global=="object"?global:{};let K;typeof pe.vscode<"u"&&typeof pe.vscode.process<"u"?K=pe.vscode.process:typeof process<"u"&&(K=process);const mi=typeof((Tn=K==null?void 0:K.versions)===null||Tn===void 0?void 0:Tn.electron)=="string"&&K.type==="renderer",vo=mi&&(K==null?void 0:K.sandboxed);if((()=>{if(vo)return"bypassHeatCheck";const t=K==null?void 0:K.env.VSCODE_BROWSER_CODE_LOADING;if(typeof t=="string")return t==="none"||t==="code"||t==="bypassHeatCheck"||t==="bypassHeatCheckAndEagerCompile"?t:"bypassHeatCheck"})(),typeof navigator=="object"&&!mi)Ke=navigator.userAgent,Ln=Ke.indexOf("Windows")>=0,Wn=Ke.indexOf("Macintosh")>=0,(Ke.indexOf("Macintosh")>=0||Ke.indexOf("iPad")>=0||Ke.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,On=Ke.indexOf("Linux")>=0,Kt=navigator.language,Un=Kt;else if(typeof K=="object"){Ln=K.platform==="win32",Wn=K.platform==="darwin",On=K.platform==="linux",On&&K.env.SNAP&&K.env.SNAP_REVISION,Kt=Zt,Un=Zt;const t=K.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t),n=e.availableLanguages["*"];Kt=e.locale,Un=n||Zt,bo=e._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const Dt=Ln,yo=Wn,fi=function(){if(pe.setImmediate)return pe.setImmediate.bind(pe);if(typeof pe.postMessage=="function"&&!pe.importScripts){let n=[];pe.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let s=0,a=n.length;s{const s=++r;n.push({id:s,callback:i}),pe.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(K==null?void 0:K.nextTick)=="function")return K.nextTick.bind(K);const e=Promise.resolve();return n=>e.then(n)}();function wo(t){let e=[],n=Object.getPrototypeOf(t);for(;Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}function Vn(t){const e=[];for(const n of wo(t))typeof t[n]=="function"&&e.push(n);return e}function gi(t,e){const n=i=>function(){const s=Array.prototype.slice.call(arguments,0);return e(i,s)};let r={};for(const i of t)r[i]=n(i);return r}const xo="$initialize";class So{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,n){let r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send({vsWorker:this._workerId,req:r,method:e,args:n})})}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){if(e.seq){let s=e;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let a=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let o=s.err;s.err.$isError&&(o=new Error,o.name=s.err.name,o.message=s.err.message,o.stack=s.err.stack),a.reject(o);return}a.resolve(s.res);return}let n=e,r=n.req;this._handler.handleMessage(n.method,n.args).then(s=>{this._send({vsWorker:this._workerId,seq:r,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=hi(s.detail)),this._send({vsWorker:this._workerId,seq:r,res:void 0,err:hi(s)})})}_send(e){let n=[];if(e.req){const r=e;for(let i=0;i{e(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n){if(e===xo)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}initialize(e,n,r,i){this._protocol.setWorkerId(e);const a=gi(i,(o,c)=>this._protocol.sendMessage(o,c));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(a),Promise.resolve(Vn(this._requestHandler))):(n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((o,c)=>{self.require([r],l=>{if(this._requestHandler=l.create(a),!this._requestHandler){c(new Error("No RequestHandler!"));return}o(Vn(this._requestHandler))},c)}))}}class $e{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function ko(t){return t.split(/\r\n|\r|\n/)}function Fo(t){for(let e=0,n=t.length;e=0;n--){const r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function bi(t,e){return(e<<5)-e+t|0}function Eo(t,e){e=bi(149417,e);for(let n=0,r=t.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new $e(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class qe{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;const[i,s,a]=qe._getElements(e),[o,c,l]=qe._getElements(n);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(qe._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let p;return r<=i?(at.Assert(e===n+1,"originalStart should only be one more than originalEnd"),p=[new $e(e,0,r,i-r+1)]):e<=n?(at.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),p=[new $e(e,n-e+1,r,0)]):(at.Assert(e===n+1,"originalStart should only be one more than originalEnd"),at.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),p=[]),p}const a=[0],o=[0],c=this.ComputeRecursionPoint(e,n,r,i,a,o,s),l=a[0],d=o[0];if(c!==null)return c;if(!s[0]){const p=this.ComputeDiffRecursive(e,l,r,d,s);let u=[];return s[0]?u=[new $e(l+1,n-(l+1)+1,d+1,i-(d+1)+1)]:u=this.ComputeDiffRecursive(l+1,n,d+1,i,s),this.ConcatenateChanges(p,u)}return[new $e(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,a,o,c,l,d,p,u,m,g,x,S,D,v){let y=null,k=null,F=new yi,I=n,T=r,P=m[0]-S[0]-i,j=-1073741824,re=this.m_forwardHistory.length-1;do{const B=P+e;B===I||B=0&&(l=this.m_forwardHistory[re],e=l[0],I=1,T=l.length-1)}while(--re>=-1);if(y=F.getReverseChanges(),v[0]){let B=m[0]+1,W=S[0]+1;if(y!==null&&y.length>0){const le=y[y.length-1];B=Math.max(B,le.getOriginalEnd()),W=Math.max(W,le.getModifiedEnd())}k=[new $e(B,u-B+1,W,x-W+1)]}else{F=new yi,I=a,T=o,P=m[0]-S[0]-c,j=1073741824,re=D?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const B=P+s;B===I||B=d[B+1]?(p=d[B+1]-1,g=p-P-c,p>j&&F.MarkNextChange(),j=p+1,F.AddOriginalElement(p+1,g+1),P=B+1-s):(p=d[B-1],g=p-P-c,p>j&&F.MarkNextChange(),j=p,F.AddModifiedElement(p+1,g+1),P=B-1-s),re>=0&&(d=this.m_reverseHistory[re],s=d[0],I=1,T=d.length-1)}while(--re>=-1);k=F.getChanges()}return this.ConcatenateChanges(y,k)}ComputeRecursionPoint(e,n,r,i,s,a,o){let c=0,l=0,d=0,p=0,u=0,m=0;e--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-e+(i-r),x=g+1,S=new Int32Array(x),D=new Int32Array(x),v=i-r,y=n-e,k=e-r,F=n-i,T=(y-v)%2===0;S[v]=e,D[y]=n,o[0]=!1;for(let P=1;P<=g/2+1;P++){let j=0,re=0;d=this.ClipDiagonalBound(v-P,P,v,x),p=this.ClipDiagonalBound(v+P,P,v,x);for(let W=d;W<=p;W+=2){W===d||Wj+re&&(j=c,re=l),!T&&Math.abs(W-y)<=P-1&&c>=D[W])return s[0]=c,a[0]=l,le<=D[W]&&P<=1448?this.WALKTRACE(v,d,p,k,y,u,m,F,S,D,c,n,s,l,i,a,T,o):null}const B=(j-e+(re-r)-P)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(j,B))return o[0]=!0,s[0]=j,a[0]=re,B>0&&P<=1448?this.WALKTRACE(v,d,p,k,y,u,m,F,S,D,c,n,s,l,i,a,T,o):(e++,r++,[new $e(e,n-e+1,r,i-r+1)]);u=this.ClipDiagonalBound(y-P,P,y,x),m=this.ClipDiagonalBound(y+P,P,y,x);for(let W=u;W<=m;W+=2){W===u||W=D[W+1]?c=D[W+1]-1:c=D[W-1],l=c-(W-y)-F;const le=c;for(;c>e&&l>r&&this.ElementsAreEqual(c,l);)c--,l--;if(D[W]=c,T&&Math.abs(W-v)<=P&&c<=S[W])return s[0]=c,a[0]=l,le>=S[W]&&P<=1448?this.WALKTRACE(v,d,p,k,y,u,m,F,S,D,c,n,s,l,i,a,T,o):null}if(P<=1447){let W=new Int32Array(p-d+2);W[0]=v-d+1,ot.Copy2(S,d,W,1,p-d+1),this.m_forwardHistory.push(W),W=new Int32Array(m-u+2),W[0]=y-u+1,ot.Copy2(D,u,W,1,m-u+1),this.m_reverseHistory.push(W)}}return this.WALKTRACE(v,d,p,k,y,u,m,F,S,D,c,n,s,l,i,a,T,o)}PrettifyChanges(e){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=e[n];let i=0,s=0;if(n>0){const p=e[n-1];i=p.originalStart+p.originalLength,s=p.modifiedStart+p.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let c=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let p=1;;p++){const u=r.originalStart-p,m=r.modifiedStart-p;if(ul&&(l=x,c=p)}r.originalStart-=c,r.modifiedStart-=c;const d=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],d)){e[n-1]=d[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&m>c&&(c=m,l=p,d=u)}return c>0?[l,d]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){const s=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(e,n){let r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){const i=new Array(e.length+n.length-1);return ot.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],ot.Copy(n,1,i,e.length,n.length-1),i}else{const i=new Array(e.length+n.length);return ot.Copy(e,0,i,0,e.length),ot.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(at.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),at.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const i=e.originalStart;let s=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new $e(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&e=zo&&t<=Mo||t>=Ao&&t<=Po}function en(t,e,n,r){let i="",s=0,a=-1,o=0,c=0;for(let l=0;l<=t.length;++l){if(l2){const d=i.lastIndexOf(n);d===-1?(i="",s=0):(i=i.slice(0,d),s=i.length-1-i.lastIndexOf(n)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(a+1,l)}`:i=t.slice(a+1,l),s=l-a-1;a=l,o=0}else c===He&&o!==-1?++o:o=-1}return i}function Si(t,e){if(e===null||typeof e!="object")throw new xi("pathObject","Object",e);const n=e.dir||e.root,r=e.base||`${e.name||""}${e.ext||""}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}const be={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],ne(s,"path"),s.length===0)continue}else e.length===0?s=jn():(s=Ro[`=${e}`]||jn(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===ye)&&(s=`${e}\\`));const a=s.length;let o=0,c="",l=!1;const d=s.charCodeAt(0);if(a===1)U(d)&&(o=1,l=!0);else if(U(d))if(l=!0,U(s.charCodeAt(1))){let p=2,u=p;for(;p2&&U(s.charCodeAt(2))&&(l=!0,o=3));if(c.length>0)if(e.length>0){if(c.toLowerCase()!==e.toLowerCase())continue}else e=c;if(r){if(e.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=l,l&&e.length>0)break}return n=en(n,!r,"\\",U),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){ne(t,"path");const e=t.length;if(e===0)return".";let n=0,r,i=!1;const s=t.charCodeAt(0);if(e===1)return Bn(s)?"\\":t;if(U(s))if(i=!0,U(t.charCodeAt(1))){let o=2,c=o;for(;o2&&U(t.charCodeAt(2))&&(i=!0,n=3));let a=n0&&U(t.charCodeAt(e-1))&&(a+="\\"),r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(t){ne(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return U(n)||e>2&&Ye(n)&&t.charCodeAt(1)===Ge&&U(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&U(n.charCodeAt(0))){++i;const s=n.length;s>1&&U(n.charCodeAt(1))&&(++i,s>2&&(U(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return be.normalize(e)},relative(t,e){if(ne(t,"from"),ne(e,"to"),t===e)return"";const n=be.resolve(t),r=be.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";let i=0;for(;ii&&t.charCodeAt(s-1)===ye;)s--;const a=s-i;let o=0;for(;oo&&e.charCodeAt(c-1)===ye;)c--;const l=c-o,d=ad){if(e.charCodeAt(o+u)===ye)return r.slice(o+u+1);if(u===2)return r.slice(o+u)}a>d&&(t.charCodeAt(i+u)===ye?p=u:u===2&&(p=3)),p===-1&&(p=0)}let m="";for(u=i+p+1;u<=s;++u)(u===s||t.charCodeAt(u)===ye)&&(m+=m.length===0?"..":"\\..");return o+=p,m.length>0?`${m}${r.slice(o,c)}`:(r.charCodeAt(o)===ye&&++o,r.slice(o,c))},toNamespacedPath(t){if(typeof t!="string")return t;if(t.length===0)return"";const e=be.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===ye){if(e.charCodeAt(1)===ye){const n=e.charCodeAt(2);if(n!==No&&n!==He)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Ye(e.charCodeAt(0))&&e.charCodeAt(1)===Ge&&e.charCodeAt(2)===ye)return`\\\\?\\${e}`;return t},dirname(t){ne(t,"path");const e=t.length;if(e===0)return".";let n=-1,r=0;const i=t.charCodeAt(0);if(e===1)return U(i)?t:".";if(U(i)){if(n=r=1,U(t.charCodeAt(1))){let o=2,c=o;for(;o2&&U(t.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=e-1;o>=r;--o)if(U(t.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&ne(e,"ext"),ne(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&&Ye(t.charCodeAt(0))&&t.charCodeAt(1)===Ge&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=n;--s){const c=t.charCodeAt(s);if(U(c)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(c===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(U(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){ne(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,a=0;t.length>=2&&t.charCodeAt(1)===Ge&&Ye(t.charCodeAt(0))&&(e=r=2);for(let o=t.length-1;o>=e;--o){const c=t.charCodeAt(o);if(U(c)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),c===He?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:Si.bind(null,"\\"),parse(t){ne(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let r=0,i=t.charCodeAt(0);if(n===1)return U(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(U(i)){if(r=1,U(t.charCodeAt(1))){let p=2,u=p;for(;p0&&(e.root=t.slice(0,r));let s=-1,a=r,o=-1,c=!0,l=t.length-1,d=0;for(;l>=r;--l){if(i=t.charCodeAt(l),U(i)){if(!c){a=l+1;break}continue}o===-1&&(c=!1,o=l+1),i===He?s===-1?s=l:d!==1&&(d=1):s!==-1&&(d=-1)}return o!==-1&&(s===-1||d===0||d===1&&s===o-1&&s===a+1?e.base=e.name=t.slice(a,o):(e.name=t.slice(a,s),e.base=t.slice(a,o),e.ext=t.slice(s,o))),a>0&&a!==r?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},we={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=-1&&!n;r--){const i=r>=0?t[r]:jn();ne(i,"path"),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===ce)}return e=en(e,!n,"/",Bn),n?`/${e}`:e.length>0?e:"."},normalize(t){if(ne(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===ce,n=t.charCodeAt(t.length-1)===ce;return t=en(t,!e,"/",Bn),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return ne(t,"path"),t.length>0&&t.charCodeAt(0)===ce},join(...t){if(t.length===0)return".";let e;for(let n=0;n0&&(e===void 0?e=r:e+=`/${r}`)}return e===void 0?".":we.normalize(e)},relative(t,e){if(ne(t,"from"),ne(e,"to"),t===e||(t=we.resolve(t),e=we.resolve(e),t===e))return"";const n=1,r=t.length,i=r-n,s=1,a=e.length-s,o=io){if(e.charCodeAt(s+l)===ce)return e.slice(s+l+1);if(l===0)return e.slice(s+l)}else i>o&&(t.charCodeAt(n+l)===ce?c=l:l===0&&(c=0));let d="";for(l=n+c+1;l<=r;++l)(l===r||t.charCodeAt(l)===ce)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(s+c)}`},toNamespacedPath(t){return t},dirname(t){if(ne(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===ce;let n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===ce){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&ne(e,"ext"),ne(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=0;--s){const c=t.charCodeAt(s);if(c===ce){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(c===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===ce){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){ne(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let a=t.length-1;a>=0;--a){const o=t.charCodeAt(a);if(o===ce){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o===He?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:Si.bind(null,"/"),parse(t){ne(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===ce;let r;n?(e.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,c=t.length-1,l=0;for(;c>=r;--c){const d=t.charCodeAt(c);if(d===ce){if(!o){s=c+1;break}continue}a===-1&&(o=!1,a=c+1),d===He?i===-1?i=c:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const d=s===0&&n?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?e.base=e.name=t.slice(d,a):(e.name=t.slice(d,i),e.base=t.slice(d,a),e.ext=t.slice(i,a))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};we.win32=be.win32=be,we.posix=be.posix=we,et==="win32"?be.normalize:we.normalize,et==="win32"?be.resolve:we.resolve,et==="win32"?be.relative:we.relative,et==="win32"?be.dirname:we.dirname,et==="win32"?be.basename:we.basename,et==="win32"?be.extname:we.extname,et==="win32"?be.sep:we.sep;const Io=/^\w[\w\d+.-]*$/,To=/^\//,Lo=/^\/\//;function Ci(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!Io.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!To.test(t.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(Lo.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Wo(t,e){return!t&&!e?"file":t}function Oo(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==Re&&(e=Re+e):e=Re;break}return e}const Q="",Re="/",Uo=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let $n=class Nn{constructor(e,n,r,i,s,a=!1){typeof e=="object"?(this.scheme=e.scheme||Q,this.authority=e.authority||Q,this.path=e.path||Q,this.query=e.query||Q,this.fragment=e.fragment||Q):(this.scheme=Wo(e,a),this.authority=n||Q,this.path=Oo(this.scheme,r||Q),this.query=i||Q,this.fragment=s||Q,Ci(this,a))}static isUri(e){return e instanceof Nn?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}get fsPath(){return qn(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=Q),r===void 0?r=this.authority:r===null&&(r=Q),i===void 0?i=this.path:i===null&&(i=Q),s===void 0?s=this.query:s===null&&(s=Q),a===void 0?a=this.fragment:a===null&&(a=Q),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new ct(n,r,i,s,a)}static parse(e,n=!1){const r=Uo.exec(e);return r?new ct(r[2]||Q,tn(r[4]||Q),tn(r[5]||Q),tn(r[7]||Q),tn(r[9]||Q),n):new ct(Q,Q,Q,Q,Q)}static file(e){let n=Q;if(Dt&&(e=e.replace(/\\/g,Re)),e[0]===Re&&e[1]===Re){const r=e.indexOf(Re,2);r===-1?(n=e.substring(2),e=Re):(n=e.substring(2,r),e=e.substring(r)||Re)}return new ct("file",n,e,Q,Q)}static from(e){const n=new ct(e.scheme,e.authority,e.path,e.query,e.fragment);return Ci(n,!0),n}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Dt&&e.scheme==="file"?r=Nn.file(be.join(qn(e,!0),...n)).path:r=we.join(e.path,...n),e.with({path:r})}toString(e=!1){return Hn(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Nn)return e;{const n=new ct(e);return n._formatted=e.external,n._fsPath=e._sep===ki?e.fsPath:null,n}}else return e}};const ki=Dt?1:void 0;class ct extends $n{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=qn(this,!1)),this._fsPath}toString(e=!1){return e?Hn(this,!0):(this._formatted||(this._formatted=Hn(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=ki),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const Fi={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _i(t,e){let n,r=-1;for(let i=0;i=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47)r!==-1&&(n+=encodeURIComponent(t.substring(r,i)),r=-1),n!==void 0&&(n+=t.charAt(i));else{n===void 0&&(n=t.substr(0,i));const a=Fi[s];a!==void 0?(r!==-1&&(n+=encodeURIComponent(t.substring(r,i)),r=-1),n+=a):r===-1&&(r=i)}}return r!==-1&&(n+=encodeURIComponent(t.substring(r))),n!==void 0?n:t}function Vo(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,Dt&&(n=n.replace(/\//g,"\\")),n}function Hn(t,e){const n=e?Vo:_i;let r="",{scheme:i,authority:s,path:a,query:o,fragment:c}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=Re,r+=Re),s){let l=s.indexOf("@");if(l!==-1){const d=s.substr(0,l);s=s.substr(l+1),l=d.indexOf(":"),l===-1?r+=n(d,!1):(r+=n(d.substr(0,l),!1),r+=":",r+=n(d.substr(l+1),!1)),r+="@"}s=s.toLowerCase(),l=s.indexOf(":"),l===-1?r+=n(s,!1):(r+=n(s.substr(0,l),!1),r+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}r+=n(a,!0)}return o&&(r+="?",r+=n(o,!1)),c&&(r+="#",r+=e?c:_i(c,!1)),r}function Ei(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+Ei(t.substr(3)):t}}const Di=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function tn(t){return t.match(Di)?t.replace(Di,e=>Ei(e)):t}let ht=class st{constructor(e,n){this.lineNumber=e,this.column=n}with(e=this.lineNumber,n=this.column){return e===this.lineNumber&&n===this.column?this:new st(e,n)}delta(e=0,n=0){return this.with(this.lineNumber+e,this.column+n)}equals(e){return st.equals(this,e)}static equals(e,n){return!e&&!n?!0:!!e&&!!n&&e.lineNumber===n.lineNumber&&e.column===n.column}isBefore(e){return st.isBefore(this,e)}static isBefore(e,n){return e.lineNumberr||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return de.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return de.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}containsRange(e){return de.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return de.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return de.plusRange(this,e)}static plusRange(e,n){let r,i,s,a;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,a=e.endColumn),new de(r,i,s,a)}intersectRanges(e){return de.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,a=e.endColumn,o=n.startLineNumber,c=n.startColumn,l=n.endLineNumber,d=n.endColumn;return rl?(s=l,a=d):s===l&&(a=Math.min(a,d)),r>s||r===s&&i>a?null:new de(r,i,s,a)}equalsRange(e){return de.equalsRange(this,e)}static equalsRange(e,n){return!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return de.getEndPosition(this)}static getEndPosition(e){return new ht(e.endLineNumber,e.endColumn)}getStartPosition(){return de.getStartPosition(this)}static getStartPosition(e){return new ht(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new de(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new de(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return de.collapseToStart(this)}static collapseToStart(e){return new de(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,n=e){return new de(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new de(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}};const jo=3;function Ri(t,e,n,r){return new qe(t,e,n).ComputeDiff(r)}class zi{constructor(e){const n=[],r=[];for(let i=0,s=e.length;i0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const m=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let x=Ri(m,g,s,!0).changes;o&&(x=$o(x)),u=[];for(let S=0,D=x.length;S1&&x>1;){const S=u.charCodeAt(g-2),D=m.charCodeAt(x-2);if(S!==D)break;g--,x--}(g>1||x>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,a+1,1,x)}{let g=Yn(u,1),x=Yn(m,1);const S=u.length+1,D=m.length+1;for(;g!0;const e=Date.now();return()=>Date.now()-e255?255:t|0}function pt(t){return t<0?0:t>4294967295?4294967295:t|0}class Ho{constructor(e,n){this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class Go{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=pt(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,n){return e=pt(e),n=pt(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;let s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=pt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],e=s)n=i+1;else break;return new Ho(i,e-a)}}class Yo{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new ht(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function Xo(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of Jo)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const Qo=Xo();function Zo(t){let e=Qo;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const Ko={maxLen:1e3,windowSize:15,timeBudget:150};function Pi(t,e,n,r,i=Ko){if(n.length>i.maxLen){let l=t-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,t+i.maxLen/2),Pi(t,e,n,r,i)}const s=Date.now(),a=t-1-r;let o=-1,c=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const d=a-i.windowSize*l;e.lastIndex=Math.max(0,d);const p=el(e,n,a,o);if(!p&&c||(c=p,d<=0))break;o=d}if(c){let l={word:c[0],startColumn:r+1+c.index,endColumn:r+1+c.index+c[0].length};return e.lastIndex=0,l}return null}function el(t,e,n,r){let i;for(;i=t.exec(e);){const s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class Jn{constructor(e){let n=Mi(e);this._defaultValue=n,this._asciiMap=Jn._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){let n=new Uint8Array(256);for(let r=0;r<256;r++)n[r]=e;return n}set(e,n){let r=Mi(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class tl{constructor(e,n,r){const i=new Uint8Array(e*n);for(let s=0,a=e*n;sn&&(n=c),o>r&&(r=o),l>r&&(r=l)}n++,r++;let i=new tl(r,n,0);for(let s=0,a=e.length;s=this._maxCharCode?0:this._states.get(e,n)}}let Xn=null;function rl(){return Xn===null&&(Xn=new nl([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Xn}let At=null;function il(){if(At===null){At=new Jn(0);const t=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),c=n.charCodeAt(a);(o===40&&c===41||o===91&&c===93||o===123&&c===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(e,n=rl()){const r=il();let i=[];for(let s=1,a=e.getLineCount();s<=a;s++){const o=e.getLineContent(s),c=o.length;let l=0,d=0,p=0,u=1,m=!1,g=!1,x=!1,S=!1;for(;l=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}Qn.INSTANCE=new Qn;let Z=class ci{constructor(e){this.element=e,this.next=ci.Undefined,this.prev=ci.Undefined}};Z.Undefined=new Z(void 0);class Ni{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let e=this._first;for(;e!==Z.Undefined;){const n=e.next;e.prev=Z.Undefined,e.next=Z.Undefined,e=n}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const r=new Z(e);if(this._first===Z.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==Z.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Z.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Z.Undefined&&e.next!==Z.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===Z.Undefined&&e.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):e.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):e.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Z.Undefined;)yield e.element,e=e.next}}const al=pe.performance&&typeof pe.performance.now=="function";class rn{constructor(e){this._highResolution=al&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new rn(e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?pe.performance.now():Date.now()}}var Zn;(function(t){t.None=()=>ui.None;function e(v){return(y,k=null,F)=>{let I=!1,T;return T=v(P=>{if(!I)return T?T.dispose():I=!0,y.call(k,P)},null,F),I&&T.dispose(),T}}t.once=e;function n(v,y){return c((k,F=null,I)=>v(T=>k.call(F,y(T)),null,I))}t.map=n;function r(v,y){return c((k,F=null,I)=>v(T=>{y(T),k.call(F,T)},null,I))}t.forEach=r;function i(v,y){return c((k,F=null,I)=>v(T=>y(T)&&k.call(F,T),null,I))}t.filter=i;function s(v){return v}t.signal=s;function a(...v){return(y,k=null,F)=>fo(...v.map(I=>I(T=>y.call(k,T),null,F)))}t.any=a;function o(v,y,k){let F=k;return n(v,I=>(F=y(F,I),F))}t.reduce=o;function c(v){let y;const k=new Te({onFirstListenerAdd(){y=v(k.fire,k)},onLastListenerRemove(){y.dispose()}});return k.event}function l(v,y,k=100,F=!1,I){let T,P,j,re=0;const B=new Te({leakWarningThreshold:I,onFirstListenerAdd(){T=v(W=>{re++,P=y(P,W),F&&!j&&(B.fire(P),P=void 0),clearTimeout(j),j=setTimeout(()=>{const le=P;P=void 0,j=void 0,(!F||re>1)&&B.fire(le),re=0},k)})},onLastListenerRemove(){T.dispose()}});return B.event}t.debounce=l;function d(v,y=(k,F)=>k===F){let k=!0,F;return i(v,I=>{const T=k||!y(I,F);return k=!1,F=I,T})}t.latch=d;function p(v,y){return[t.filter(v,y),t.filter(v,k=>!y(k))]}t.split=p;function u(v,y=!1,k=[]){let F=k.slice(),I=v(j=>{F?F.push(j):P.fire(j)});const T=()=>{F&&F.forEach(j=>P.fire(j)),F=null},P=new Te({onFirstListenerAdd(){I||(I=v(j=>P.fire(j)))},onFirstListenerDidAdd(){F&&(y?setTimeout(T):T())},onLastListenerRemove(){I&&I.dispose(),I=null}});return P.event}t.buffer=u;class m{constructor(y){this.event=y}map(y){return new m(n(this.event,y))}forEach(y){return new m(r(this.event,y))}filter(y){return new m(i(this.event,y))}reduce(y,k){return new m(o(this.event,y,k))}latch(){return new m(d(this.event))}debounce(y,k=100,F=!1,I){return new m(l(this.event,y,k,F,I))}on(y,k,F){return this.event(y,k,F)}once(y,k,F){return e(this.event)(y,k,F)}}function g(v){return new m(v)}t.chain=g;function x(v,y,k=F=>F){const F=(...j)=>P.fire(k(...j)),I=()=>v.on(y,F),T=()=>v.removeListener(y,F),P=new Te({onFirstListenerAdd:I,onLastListenerRemove:T});return P.event}t.fromNodeEventEmitter=x;function S(v,y,k=F=>F){const F=(...j)=>P.fire(k(...j)),I=()=>v.addEventListener(y,F),T=()=>v.removeEventListener(y,F),P=new Te({onFirstListenerAdd:I,onLastListenerRemove:T});return P.event}t.fromDOMEventEmitter=S;function D(v){return new Promise(y=>e(v)(y))}t.toPromise=D})(Zn||(Zn={}));class sn{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${sn._idPool++}`}start(e){this._stopWatch=new rn(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}sn._idPool=0;class Te{constructor(e){var n;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=!((n=this._options)===null||n===void 0)&&n._profName?new sn(this._options._profName):void 0}get event(){return this._event||(this._event=(e,n,r)=>{var i;this._listeners||(this._listeners=new Ni);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(n?[e,n]:e);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,n);const o=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size);let c;return c={dispose:()=>{o&&o(),c.dispose=Te._noop,this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))}},r instanceof Et?r.add(c):Array.isArray(r)&&r.push(c),c}),this._event}fire(e){var n,r;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Ni);for(let i of this._listeners)this._deliveryQueue.push([i,e]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,s]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,s):i[0].call(i[1],s)}catch(a){ho(a)}}(r=this._perfMon)===null||r===void 0||r.stop()}}dispose(){var e,n,r,i,s;this._disposed||(this._disposed=!0,(e=this._listeners)===null||e===void 0||e.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(i=(r=this._options)===null||r===void 0?void 0:r.onLastListenerRemove)===null||i===void 0||i.call(r),(s=this._leakageMon)===null||s===void 0||s.dispose())}}Te._noop=function(){};const Ii=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});var an;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof on?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Zn.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ii})})(an||(an={}));class on{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ii:(this._emitter||(this._emitter=new Te),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class ol{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new on),this._token}cancel(){this._token?this._token instanceof on&&this._token.cancel():this._token=an.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof on&&this._token.dispose():this._token=an.None}}class Kn{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const er=new Kn,tr=new Kn,nr=new Kn;(function(){function t(e,n,r=n,i=r){er.define(e,n),tr.define(e,r),nr.define(e,i)}t(0,"unknown"),t(1,"Backspace"),t(2,"Tab"),t(3,"Enter"),t(4,"Shift"),t(5,"Ctrl"),t(6,"Alt"),t(7,"PauseBreak"),t(8,"CapsLock"),t(9,"Escape"),t(10,"Space"),t(11,"PageUp"),t(12,"PageDown"),t(13,"End"),t(14,"Home"),t(15,"LeftArrow","Left"),t(16,"UpArrow","Up"),t(17,"RightArrow","Right"),t(18,"DownArrow","Down"),t(19,"Insert"),t(20,"Delete"),t(21,"0"),t(22,"1"),t(23,"2"),t(24,"3"),t(25,"4"),t(26,"5"),t(27,"6"),t(28,"7"),t(29,"8"),t(30,"9"),t(31,"A"),t(32,"B"),t(33,"C"),t(34,"D"),t(35,"E"),t(36,"F"),t(37,"G"),t(38,"H"),t(39,"I"),t(40,"J"),t(41,"K"),t(42,"L"),t(43,"M"),t(44,"N"),t(45,"O"),t(46,"P"),t(47,"Q"),t(48,"R"),t(49,"S"),t(50,"T"),t(51,"U"),t(52,"V"),t(53,"W"),t(54,"X"),t(55,"Y"),t(56,"Z"),t(57,"Meta"),t(58,"ContextMenu"),t(59,"F1"),t(60,"F2"),t(61,"F3"),t(62,"F4"),t(63,"F5"),t(64,"F6"),t(65,"F7"),t(66,"F8"),t(67,"F9"),t(68,"F10"),t(69,"F11"),t(70,"F12"),t(71,"F13"),t(72,"F14"),t(73,"F15"),t(74,"F16"),t(75,"F17"),t(76,"F18"),t(77,"F19"),t(78,"NumLock"),t(79,"ScrollLock"),t(80,";",";","OEM_1"),t(81,"=","=","OEM_PLUS"),t(82,",",",","OEM_COMMA"),t(83,"-","-","OEM_MINUS"),t(84,".",".","OEM_PERIOD"),t(85,"/","/","OEM_2"),t(86,"`","`","OEM_3"),t(110,"ABNT_C1"),t(111,"ABNT_C2"),t(87,"[","[","OEM_4"),t(88,"\\","\\","OEM_5"),t(89,"]","]","OEM_6"),t(90,"'","'","OEM_7"),t(91,"OEM_8"),t(92,"OEM_102"),t(93,"NumPad0"),t(94,"NumPad1"),t(95,"NumPad2"),t(96,"NumPad3"),t(97,"NumPad4"),t(98,"NumPad5"),t(99,"NumPad6"),t(100,"NumPad7"),t(101,"NumPad8"),t(102,"NumPad9"),t(103,"NumPad_Multiply"),t(104,"NumPad_Add"),t(105,"NumPad_Separator"),t(106,"NumPad_Subtract"),t(107,"NumPad_Decimal"),t(108,"NumPad_Divide")})();var Ti;(function(t){function e(a){return er.keyCodeToStr(a)}t.toString=e;function n(a){return er.strToKeyCode(a)}t.fromString=n;function r(a){return tr.keyCodeToStr(a)}t.toUserSettingsUS=r;function i(a){return nr.keyCodeToStr(a)}t.toUserSettingsGeneral=i;function s(a){return tr.strToKeyCode(a)||nr.strToKeyCode(a)}t.fromUserSettings=s})(Ti||(Ti={}));function ll(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}class ze extends dt{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return ze.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new ze(this.startLineNumber,this.startColumn,e,n):new ze(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new ht(this.positionLineNumber,this.positionColumn)}setStartPosition(e,n){return this.getDirection()===0?new ze(e,n,this.endLineNumber,this.endColumn):new ze(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new ze(e.lineNumber,e.column,n.lineNumber,n.column)}static liftSelection(e){return new ze(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}}class mt{constructor(e,n){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(n=>e.push(this._models[n])),e}acceptNewModel(e){this._models[e.url]=new dl($n.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,n,r,i){return ut(this,void 0,void 0,function*(){const s=this._getModel(e),a=this._getModel(n);if(!s||!a)return null;const o=s.getLinesContent(),c=a.getLinesContent(),d=new qo(o,c,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:r,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),p=d.changes.length>0?!1:this._modelsAreIdentical(s,a);return{quitEarly:d.quitEarly,identical:p,changes:d.changes}})}_modelsAreIdentical(e,n){const r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=e.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}computeMoreMinimalEdits(e,n){return ut(this,void 0,void 0,function*(){const r=this._getModel(e);if(!r)return n;const i=[];let s;n=n.slice(0).sort((a,o)=>{if(a.range&&o.range)return dt.compareRangesUsingStarts(a.range,o.range);let c=a.range?0:1,l=o.range?0:1;return c-l});for(let{range:a,text:o,eol:c}of n){if(typeof c=="number"&&(s=c),dt.isEmpty(a)&&!o)continue;const l=r.getValueInRange(a);if(o=o.replace(/\r\n|\n|\r/g,r.eol),l===o)continue;if(Math.max(o.length,l.length)>mt._diffLimit){i.push({range:a,text:o});continue}const d=Do(l,o,!1),p=r.offsetAt(dt.lift(a).getStartPosition());for(const u of d){const m=r.positionAt(p+u.originalStart),g=r.positionAt(p+u.originalStart+u.originalLength),x={text:o.substr(u.modifiedStart,u.modifiedLength),range:{startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:g.lineNumber,endColumn:g.column}};r.getValueInRange(x.range)!==x.text&&i.push(x)}}return typeof s=="number"&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(e){return ut(this,void 0,void 0,function*(){let n=this._getModel(e);return n?sl(n):null})}textualSuggest(e,n,r,i){return ut(this,void 0,void 0,function*(){const s=new rn(!0),a=new RegExp(r,i),o=new Set;e:for(let c of e){const l=this._getModel(c);if(l){for(let d of l.words(a))if(!(d===n||!isNaN(Number(d)))&&(o.add(d),o.size>mt._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(e,n,r,i){return ut(this,void 0,void 0,function*(){let s=this._getModel(e);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let c=n.startLineNumber;cthis._host.fhr(o,c)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,n),Promise.resolve(Vn(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,n){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}}mt._diffLimit=1e5,mt._suggestionsLimit=1e4,typeof importScripts=="function"&&(pe.monaco=hl());let or=!1;function ms(t){if(or)return;or=!0;const e=new Co(n=>{self.postMessage(n)},n=>new mt(n,t));self.onmessage=n=>{e.onmessage(n.data)}}self.onmessage=t=>{or||ms(null)};var h;(function(t){t[t.Ident=0]="Ident",t[t.AtKeyword=1]="AtKeyword",t[t.String=2]="String",t[t.BadString=3]="BadString",t[t.UnquotedString=4]="UnquotedString",t[t.Hash=5]="Hash",t[t.Num=6]="Num",t[t.Percentage=7]="Percentage",t[t.Dimension=8]="Dimension",t[t.UnicodeRange=9]="UnicodeRange",t[t.CDO=10]="CDO",t[t.CDC=11]="CDC",t[t.Colon=12]="Colon",t[t.SemiColon=13]="SemiColon",t[t.CurlyL=14]="CurlyL",t[t.CurlyR=15]="CurlyR",t[t.ParenthesisL=16]="ParenthesisL",t[t.ParenthesisR=17]="ParenthesisR",t[t.BracketL=18]="BracketL",t[t.BracketR=19]="BracketR",t[t.Whitespace=20]="Whitespace",t[t.Includes=21]="Includes",t[t.Dashmatch=22]="Dashmatch",t[t.SubstringOperator=23]="SubstringOperator",t[t.PrefixOperator=24]="PrefixOperator",t[t.SuffixOperator=25]="SuffixOperator",t[t.Delim=26]="Delim",t[t.EMS=27]="EMS",t[t.EXS=28]="EXS",t[t.Length=29]="Length",t[t.Angle=30]="Angle",t[t.Time=31]="Time",t[t.Freq=32]="Freq",t[t.Exclamation=33]="Exclamation",t[t.Resolution=34]="Resolution",t[t.Comma=35]="Comma",t[t.Charset=36]="Charset",t[t.EscapedJavaScript=37]="EscapedJavaScript",t[t.BadEscapedJavaScript=38]="BadEscapedJavaScript",t[t.Comment=39]="Comment",t[t.SingleLineComment=40]="SingleLineComment",t[t.EOF=41]="EOF",t[t.CustomToken=42]="CustomToken"})(h||(h={}));var fs=function(){function t(e){this.source=e,this.len=e.length,this.position=0}return t.prototype.substring=function(e,n){return n===void 0&&(n=this.position),this.source.substring(e,n)},t.prototype.eos=function(){return this.len<=this.position},t.prototype.pos=function(){return this.position},t.prototype.goBackTo=function(e){this.position=e},t.prototype.goBack=function(e){this.position-=e},t.prototype.advance=function(e){this.position+=e},t.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},t.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},t.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},t.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},t.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var n=0;n=ln&&n<=cn?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(r){return r>=ln&&r<=cn||e===0&&r===ks}),!0):!1},t.prototype._newline=function(e){var n=this.stream.peekChar();switch(n){case bt:case Nt:case gt:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===bt&&this.stream.advanceIfChar(gt)&&e.push(` `),!0}return!1},t.prototype._escape=function(e,n){var r=this.stream.peekChar();if(r===dr){this.stream.advance(1),r=this.stream.peekChar();for(var i=0;i<6&&(r>=ln&&r<=cn||r>=lr&&r<=pl||r>=cr&&r<=ul);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===pr||r===ur?this.stream.advance(1):this._newline([]),!0}if(r!==bt&&r!==Nt&&r!==gt)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1},t.prototype._stringChar=function(e,n){var r=this.stream.peekChar();return r!==0&&r!==e&&r!==dr&&r!==bt&&r!==Nt&&r!==gt?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1},t.prototype._string=function(e){if(this.stream.peekChar()===Cs||this.stream.peekChar()===Ss){var n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),h.String):h.BadString}return null},t.prototype._unquotedChar=function(e){var n=this.stream.peekChar();return n!==0&&n!==dr&&n!==Cs&&n!==Ss&&n!==ys&&n!==ws&&n!==pr&&n!==ur&&n!==gt&&n!==Nt&&n!==bt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._unquotedString=function(e){for(var n=!1;this._unquotedChar(e)||this._escape(e);)n=!0;return n},t.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(n){return n===pr||n===ur||n===gt||n===Nt||n===bt});return e>0},t.prototype._name=function(e){for(var n=!1;this._identChar(e)||this._escape(e);)n=!0;return n},t.prototype.ident=function(e){var n=this.stream.pos(),r=this._minus(e);if(r&&this._minus(e)){if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1},t.prototype._identFirstChar=function(e){var n=this.stream.peekChar();return n===vs||n>=lr&&n<=gs||n>=cr&&n<=bs||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._minus=function(e){var n=this.stream.peekChar();return n===ft?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._identChar=function(e){var n=this.stream.peekChar();return n===vs||n===ft||n>=lr&&n<=gs||n>=cr&&n<=bs||n>=ln&&n<=cn||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t}();function he(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function zl(t,e,n){n===void 0&&(n=4);var r=Math.abs(t.length-e.length);if(r>n)return 0;var i=[],s=[],a,o;for(a=0;at.end?null:(t.accept(function(r){return r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1}),n)}function fr(t,e){for(var n=mr(t,e),r=[];n;)r.unshift(n),n=n.parent;return r}function Ml(t){var e=t.findParent(f.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}var M=function(){function t(e,n,r){e===void 0&&(e=-1),n===void 0&&(n=-1),this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}return Object.defineProperty(t.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.nodeType||f.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),t.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},t.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},t.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},t.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},t.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},t.prototype.accept=function(e){if(e(this)&&this.children)for(var n=0,r=this.children;n=0&&e.parent.children.splice(r,1)}e.parent=this;var i=this.children;return i||(i=this.children=[]),n!==-1?i.splice(n,0,e):i.push(e),e},t.prototype.attachTo=function(e,n){return n===void 0&&(n=-1),e&&e.adoptChild(this,n),this},t.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},t.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},t.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(n){return n.getRule()===e})},t.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(n){return n.isErroneous(!0)})},t.prototype.setNode=function(e,n,r){return r===void 0&&(r=-1),n?(n.attachTo(this,r),this[e]=n,!0):!1},t.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},t.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)},t.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},t.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},t.prototype.getChild=function(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null},t.prototype.findChildAtOffset=function(e,n){var r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null},t.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},t.prototype.getParent=function(){for(var e=this.parent;e instanceof ue;)e=e.parent;return e},t.prototype.findParent=function(e){for(var n=this;n&&n.type!==e;)n=n.parent;return n},t.prototype.findAParent=function(){for(var e=[],n=0;n/g,">")}function hc(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;var n="";if((e==null?void 0:e.documentation)!==!1){t.status&&(n+=Vs(t.status)),n+=t.description;var r=js(t.browsers);r&&(n+=` (`+r+")"),"syntax"in t&&(n+=` Syntax: `+t.syntax)}return t.references&&t.references.length>0&&(e==null?void 0:e.references)!==!1&&(n.length>0&&(n+=` `),n+=t.references.map(function(i){return i.name+": "+i.url}).join(" | ")),n}function dc(t,e){if(!t.description||t.description==="")return"";var n="";if((e==null?void 0:e.documentation)!==!1){t.status&&(n+=Vs(t.status));var r=typeof t.description=="string"?t.description:t.description.value;n+=Fr(r);var i=js(t.browsers);i&&(n+=` (`+Fr(i)+")"),"syntax"in t&&t.syntax&&(n+=` Syntax: `+Fr(t.syntax))}return t.references&&t.references.length>0&&(e==null?void 0:e.references)!==!1&&(n.length>0&&(n+=` `),n+=t.references.map(function(s){return"["+s.name+"]("+s.url+")"}).join(" | ")),n}function js(t){return t===void 0&&(t=[]),t.length===0?null:t.map(function(e){var n="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Us&&(n+=Us[i]),s&&(n+=" "+s),n}).join(", ")}var mn=Me(),pc=[{func:"rgb($red, $green, $blue)",desc:mn("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:mn("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:mn("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:mn("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")}],fn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Bs={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."};function xt(t,e){var n=t.getText(),r=n.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);var i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function uc(t){var e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);if(n)return parseFloat(e)%360;throw new Error}function mc(t){var e=t.getName();return e?/^(rgb|rgba|hsl|hsla)$/gi.test(e):!1}var $s=48,fc=57,gc=65,gn=97,bc=102;function ie(t){return t<$s?0:t<=fc?t-$s:(t=gn&&t<=bc?t-gn+10:0)}function qs(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:ie(t.charCodeAt(1))*17/255,green:ie(t.charCodeAt(2))*17/255,blue:ie(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ie(t.charCodeAt(1))*17/255,green:ie(t.charCodeAt(2))*17/255,blue:ie(t.charCodeAt(3))*17/255,alpha:ie(t.charCodeAt(4))*17/255};case 7:return{red:(ie(t.charCodeAt(1))*16+ie(t.charCodeAt(2)))/255,green:(ie(t.charCodeAt(3))*16+ie(t.charCodeAt(4)))/255,blue:(ie(t.charCodeAt(5))*16+ie(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ie(t.charCodeAt(1))*16+ie(t.charCodeAt(2)))/255,green:(ie(t.charCodeAt(3))*16+ie(t.charCodeAt(4)))/255,blue:(ie(t.charCodeAt(5))*16+ie(t.charCodeAt(6)))/255,alpha:(ie(t.charCodeAt(7))*16+ie(t.charCodeAt(8)))/255}}return null}function vc(t,e,n,r){if(r===void 0&&(r=1),t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};var i=function(o,c,l){for(;l<0;)l+=6;for(;l>=6;)l-=6;return l<1?(c-o)*l+o:l<3?c:l<4?(c-o)*(4-l)+o:o},s=n<=.5?n*(e+1):n+e-n*e,a=n*2-s;return{red:i(a,s,t+2),green:i(a,s,t),blue:i(a,s,t-2),alpha:r}}function yc(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),a=Math.min(e,n,r),o=0,c=0,l=(a+s)/2,d=s-a;if(d>0){switch(c=Math.min(l<=.5?d/(2*l):d/(2-2*l),1),s){case e:o=(n-r)/d+(n4)return null;try{var s=i.length===4?xt(i[3],1):1;if(r==="rgb"||r==="rgba")return{red:xt(i[0],255),green:xt(i[1],255),blue:xt(i[2],255),alpha:s};if(r==="hsl"||r==="hsla"){var a=uc(i[0]),o=xt(i[1],100),c=xt(i[2],100);return vc(a,o,c,s)}}catch{return null}}else if(t.type===f.Identifier){if(t.parent&&t.parent.type!==f.Term)return null;var l=t.parent;if(l&&l.parent&&l.parent.type===f.BinaryExpression){var d=l.parent;if(d.parent&&d.parent.type===f.ListEntry&&d.parent.key===d)return null}var p=t.getText().toLowerCase();if(p==="none")return null;var u=fn[p];if(u)return qs(u)}return null}var Hs={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},Gs={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},Ys={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},xc=["medium","thick","thin"],Js={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},Xs={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},Qs={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Zs={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},Ks={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},ea={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},ta={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Sc=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Cc=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],kc=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function bn(t){return Object.keys(t).map(function(e){return t[e]})}function Ee(t){return typeof t<"u"}var _r=function(){function t(e){e===void 0&&(e=new It),this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:h.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}return t.prototype.peekIdent=function(e){return h.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},t.prototype.peekKeyword=function(e){return h.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},t.prototype.peekDelim=function(e){return h.Delim===this.token.type&&e===this.token.text},t.prototype.peek=function(e){return e===this.token.type},t.prototype.peekOne=function(e){return e.indexOf(this.token.type)!==-1},t.prototype.peekRegExp=function(e,n){return e!==this.token.type?!1:n.test(this.token.text)},t.prototype.hasWhitespace=function(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset},t.prototype.consumeToken=function(){this.prevToken=this.token,this.token=this.scanner.scan()},t.prototype.mark=function(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}},t.prototype.restoreAtMark=function(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)},t.prototype.try=function(e){var n=this.mark(),r=e();return r||(this.restoreAtMark(n),null)},t.prototype.acceptOneKeyword=function(e){if(h.AtKeyword===this.token.type)for(var n=0,r=e;ne.offset?s-e.offset:0}return e},t.prototype.markError=function(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new Os(e,n,xe.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)},t.prototype.parseStylesheet=function(e){var n=e.version,r=e.getText(),i=function(s,a){if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,a)};return this.internalParse(r,this._parseStylesheet,i)},t.prototype.internalParse=function(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();var i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=function(s,a){return e.substr(s,a)}),i},t.prototype._parseStylesheet=function(){for(var e=this.create(Pl);e.addChild(this._parseStylesheetStart()););var n=!1;do{var r=!1;do{r=!1;var i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(h.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(h.SemiColon)&&this.markError(e,b.SemiColonExpected));this.accept(h.SemiColon)||this.accept(h.CDO)||this.accept(h.CDC);)r=!0,n=!1}while(r);if(this.peek(h.EOF))break;n||(this.peek(h.AtKeyword)?this.markError(e,b.UnknownAtRule):this.markError(e,b.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(h.EOF));return this.finish(e)},t.prototype._parseStylesheetStart=function(){return this._parseCharset()},t.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(h.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},t.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},t.prototype._tryParseRuleset=function(e){var n=this.mark();if(this._parseSelector(e)){for(;this.accept(h.Comma)&&this._parseSelector(e););if(this.accept(h.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null},t.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var n=this.create(vt),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(h.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,b.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},t.prototype._parseRuleSetDeclaration=function(){return this.peek(h.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},t.prototype._needsSemicolonAfter=function(e){switch(e.type){case f.Keyframe:case f.ViewPort:case f.Media:case f.Ruleset:case f.Namespace:case f.If:case f.For:case f.Each:case f.While:case f.MixinDeclaration:case f.FunctionDeclaration:case f.MixinContentDeclaration:return!1;case f.ExtendsReference:case f.MixinContentReference:case f.ReturnStatement:case f.MediaQuery:case f.Debug:case f.Import:case f.AtApplyRule:case f.CustomPropertyDeclaration:return!0;case f.VariableDeclaration:return e.needsSemicolon;case f.MixinReference:return!e.getContent();case f.Declaration:return!e.getNestedProperties()}return!1},t.prototype._parseDeclarations=function(e){var n=this.create(gr);if(!this.accept(h.CurlyL))return null;for(var r=e();n.addChild(r)&&!this.peek(h.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(h.SemiColon))return this.finish(n,b.SemiColonExpected,[h.SemiColon,h.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===h.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(h.SemiColon););r=e()}return this.accept(h.CurlyR)?this.finish(n):this.finish(n,b.RightCurlyExpected,[h.CurlyR,h.SemiColon])},t.prototype._parseBody=function(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,b.LeftCurlyExpected,[h.CurlyR,h.SemiColon])},t.prototype._parseSelector=function(e){var n=this.create(Tt),r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null},t.prototype._parseDeclaration=function(e){var n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;var r=this.create(We);return r.setProperty(this._parseProperty())?this.accept(h.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(h.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,b.PropertyValueExpected)):this.finish(r,b.ColonExpected,[h.Colon],e||[h.SemiColon]):null},t.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(h.Ident,/^--/))return null;var n=this.create(Il);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(h.Colon))return this.finish(n,b.ColonExpected,[h.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var r=this.mark();if(this.peek(h.CurlyL)){var i=this.create(Nl),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(i.setDeclarations(s)&&!s.isErroneous(!0)&&(i.addChild(this._parsePrio()),this.peek(h.SemiColon)))return this.finish(i),n.setPropertySet(i),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}var a=this._parseExpr();return a&&!a.isErroneous(!0)&&(this._parsePrio(),this.peekOne(e||[h.SemiColon]))?(n.setValue(a),n.semicolonPosition=this.token.offset,this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),Ee(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,b.PropertyValueExpected):this.finish(n))},t.prototype._parseCustomPropertyValue=function(e){var n=this;e===void 0&&(e=[h.CurlyR]);var r=this.create(M),i=function(){return a===0&&o===0&&c===0},s=function(){return e.indexOf(n.token.type)!==-1},a=0,o=0,c=0;e:for(;;){switch(this.token.type){case h.SemiColon:if(i())break e;break;case h.Exclamation:if(i())break e;break;case h.CurlyL:a++;break;case h.CurlyR:if(a--,a<0){if(s()&&o===0&&c===0)break e;return this.finish(r,b.LeftCurlyExpected)}break;case h.ParenthesisL:o++;break;case h.ParenthesisR:if(o--,o<0){if(s()&&c===0&&a===0)break e;return this.finish(r,b.LeftParenthesisExpected)}break;case h.BracketL:c++;break;case h.BracketR:if(c--,c<0)return this.finish(r,b.LeftSquareBracketExpected);break;case h.BadString:break e;case h.EOF:var l=b.RightCurlyExpected;return c>0?l=b.RightSquareBracketExpected:o>0&&(l=b.RightParenthesisExpected),this.finish(r,l)}this.consumeToken()}return this.finish(r)},t.prototype._tryToParseDeclaration=function(e){var n=this.mark();return this._parseProperty()&&this.accept(h.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)},t.prototype._parseProperty=function(){var e=this.create(vr),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},t.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},t.prototype._parseCharset=function(){if(!this.peek(h.Charset))return null;var e=this.create(M);return this.consumeToken(),this.accept(h.String)?this.accept(h.SemiColon)?this.finish(e):this.finish(e,b.SemiColonExpected):this.finish(e,b.IdentifierExpected)},t.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(yr);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,b.URIOrStringExpected):(!this.peek(h.SemiColon)&&!this.peek(h.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},t.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Gl);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,b.URIExpected,[h.SemiColon]):this.accept(h.SemiColon)?this.finish(e):this.finish(e,b.SemiColonExpected)},t.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(Ds);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(jl);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseKeyframe=function(){if(!this.peekRegExp(h.AtKeyword,this.keyframeRegex))return null;var e=this.create(zs),n=this.create(M);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,b.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,b.IdentifierExpected,[h.CurlyR])},t.prototype._parseKeyframeIdent=function(){return this._parseIdent([$.Keyframe])},t.prototype._parseKeyframeSelector=function(){var e=this.create(As);if(!e.addChild(this._parseIdent())&&!this.accept(h.Percentage))return null;for(;this.accept(h.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(h.Percentage))return this.finish(e,b.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._tryParseKeyframeSelector=function(){var e=this.create(As),n=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(h.Percentage))return null;for(;this.accept(h.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(h.Percentage))return this.restoreAtMark(n),null;return this.peek(h.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)},t.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var n=this.create(wr);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))},t.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseSupportsCondition=function(){var e=this.create(Wt);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(h.Ident,/^(and|or)$/i))for(var n=this.token.text.toLowerCase();this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},t.prototype._parseSupportsConditionInParens=function(){var e=this.create(Wt);if(this.accept(h.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([h.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,b.ConditionExpected):this.accept(h.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,b.RightParenthesisExpected,[h.ParenthesisR],[]);if(this.peek(h.Ident)){var n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(h.ParenthesisL)){for(var r=1;this.token.type!==h.EOF&&r!==0;)this.token.type===h.ParenthesisL?r++:this.token.type===h.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,b.LeftParenthesisExpected,[],[h.ParenthesisL])},t.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var n=this.create(Ms);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,b.MediaQueryExpected)},t.prototype._parseMediaQueryList=function(){var e=this.create(Ps);if(!e.addChild(this._parseMediaQuery([h.CurlyL])))return this.finish(e,b.MediaQueryExpected);for(;this.accept(h.Comma);)if(!e.addChild(this._parseMediaQuery([h.CurlyL])))return this.finish(e,b.MediaQueryExpected);return this.finish(e)},t.prototype._parseMediaQuery=function(e){var n=this.create(Ns),r=!0,i=!1;if(!this.peek(h.ParenthesisL)){if(this.acceptIdent("only")||this.acceptIdent("not"),!n.addChild(this._parseIdent()))return null;i=!0,r=this.acceptIdent("and")}for(;r;){if(n.addChild(this._parseMediaContentStart())){r=this.acceptIdent("and");continue}if(!this.accept(h.ParenthesisL))return i?this.finish(n,b.LeftParenthesisExpected,[],e):null;if(!n.addChild(this._parseMediaFeatureName()))return this.finish(n,b.IdentifierExpected,[],e);if(this.accept(h.Colon)&&!n.addChild(this._parseExpr()))return this.finish(n,b.TermExpected,[],e);if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected,[],e);r=this.acceptIdent("and")}return this.finish(n)},t.prototype._parseMediaContentStart=function(){return null},t.prototype._parseMediaFeatureName=function(){return this._parseIdent()},t.prototype._parseMedium=function(){var e=this.create(M);return e.addChild(this._parseIdent())?this.finish(e):null},t.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},t.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(Jl);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(h.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,b.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},t.prototype._parsePageMarginBox=function(){if(!this.peek(h.AtKeyword))return null;var e=this.create(Xl);return this.acceptOneKeyword(kc)||this.markError(e,b.UnknownAtRule,[],[h.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parsePageSelector=function(){if(!this.peek(h.Ident)&&!this.peek(h.Colon))return null;var e=this.create(M);return e.addChild(this._parseIdent()),this.accept(h.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,b.IdentifierExpected):this.finish(e)},t.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(Yl);return this.consumeToken(),this.resync([],[h.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},t.prototype._parseUnknownAtRule=function(){if(!this.peek(h.AtKeyword))return null;var e=this.create(Ls);e.addChild(this._parseUnknownAtRuleName());var n=function(){return i===0&&s===0&&a===0},r=0,i=0,s=0,a=0;e:for(;;){switch(this.token.type){case h.SemiColon:if(n())break e;break;case h.EOF:return i>0?this.finish(e,b.RightCurlyExpected):a>0?this.finish(e,b.RightSquareBracketExpected):s>0?this.finish(e,b.RightParenthesisExpected):this.finish(e);case h.CurlyL:r++,i++;break;case h.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),a>0)return this.finish(e,b.RightSquareBracketExpected);if(s>0)return this.finish(e,b.RightParenthesisExpected);break e}if(i<0){if(s===0&&a===0)break e;return this.finish(e,b.LeftCurlyExpected)}break;case h.ParenthesisL:s++;break;case h.ParenthesisR:if(s--,s<0)return this.finish(e,b.LeftParenthesisExpected);break;case h.BracketL:a++;break;case h.BracketR:if(a--,a<0)return this.finish(e,b.LeftSquareBracketExpected);break}this.consumeToken()}return e},t.prototype._parseUnknownAtRuleName=function(){var e=this.create(M);return this.accept(h.AtKeyword)?this.finish(e):e},t.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(h.Dashmatch)||this.peek(h.Includes)||this.peek(h.SubstringOperator)||this.peek(h.PrefixOperator)||this.peek(h.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(f.Operator);return this.consumeToken(),this.finish(e)}else return null},t.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(M);return this.consumeToken(),this.finish(e)},t.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(M);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=f.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=f.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(M);return this.consumeToken(),e.type=f.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(M);return this.consumeToken(),e.type=f.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(M);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=f.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null},t.prototype._parseSimpleSelector=function(){var e=this.create(yt),n=0;for(e.addChild(this._parseElementName())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null},t.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},t.prototype._parseSelectorIdent=function(){return this._parseIdent()},t.prototype._parseHash=function(){if(!this.peek(h.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(f.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,b.IdentifierExpected)}else this.consumeToken();return this.finish(e)},t.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(f.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,b.IdentifierExpected):this.finish(e)},t.prototype._parseElementName=function(){var e=this.mark(),n=this.createNode(f.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)},t.prototype._parseNamespacePrefix=function(){var e=this.mark(),n=this.createNode(f.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)},t.prototype._parseAttrib=function(){if(!this.peek(h.BracketL))return null;var e=this.create(Zl);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i")),this.accept(h.BracketR)?this.finish(e):this.finish(e,b.RightSquareBracketExpected)):this.finish(e,b.IdentifierExpected)},t.prototype._parsePseudo=function(){var e=this,n=this._tryParsePseudoIdentifier();if(n){if(!this.hasWhitespace()&&this.accept(h.ParenthesisL)){var r=function(){var i=e.create(M);if(!i.addChild(e._parseSelector(!1)))return null;for(;e.accept(h.Comma)&&i.addChild(e._parseSelector(!1)););return e.peek(h.ParenthesisR)?e.finish(i):null};if(n.addChild(this.try(r)||this._parseBinaryExpr()),!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected)}return this.finish(n)}return null},t.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(h.Colon))return null;var e=this.mark(),n=this.createNode(f.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(h.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,b.IdentifierExpected):this.finish(n))},t.prototype._tryParsePrio=function(){var e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)},t.prototype._parsePrio=function(){if(!this.peek(h.Exclamation))return null;var e=this.createNode(f.Prio);return this.accept(h.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},t.prototype._parseExpr=function(e){e===void 0&&(e=!1);var n=this.create(Is);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(h.Comma)){if(e)return this.finish(n);this.consumeToken()}if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)},t.prototype._parseNamedLine=function(){if(!this.peek(h.BracketL))return null;var e=this.createNode(f.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(h.BracketR)?this.finish(e):this.finish(e,b.RightSquareBracketExpected)},t.prototype._parseBinaryExpr=function(e,n){var r=this.create(Ts);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,b.TermExpected);r=this.finish(r);var i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)},t.prototype._parseTerm=function(){var e=this.create(Ql);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},t.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},t.prototype._parseOperation=function(){if(!this.peek(h.ParenthesisL))return null;var e=this.create(M);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(h.ParenthesisR)?this.finish(e):this.finish(e,b.RightParenthesisExpected)},t.prototype._parseNumeric=function(){if(this.peek(h.Num)||this.peek(h.Percentage)||this.peek(h.Resolution)||this.peek(h.Length)||this.peek(h.EMS)||this.peek(h.EXS)||this.peek(h.Angle)||this.peek(h.Time)||this.peek(h.Dimension)||this.peek(h.Freq)){var e=this.create(Sr);return this.consumeToken(),this.finish(e)}return null},t.prototype._parseStringLiteral=function(){if(!this.peek(h.String)&&!this.peek(h.BadString))return null;var e=this.createNode(f.StringLiteral);return this.consumeToken(),this.finish(e)},t.prototype._parseURILiteral=function(){if(!this.peekRegExp(h.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),n=this.createNode(f.URILiteral);return this.accept(h.Ident),this.hasWhitespace()||!this.peek(h.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(h.ParenthesisR)?this.finish(n):this.finish(n,b.RightParenthesisExpected))},t.prototype._parseURLArgument=function(){var e=this.create(M);return!this.accept(h.String)&&!this.accept(h.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},t.prototype._parseIdent=function(e){if(!this.peek(h.Ident))return null;var n=this.create(Ae);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(h.Ident,/^--/),this.consumeToken(),this.finish(n)},t.prototype._parseFunction=function(){var e=this.mark(),n=this.create(Lt);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(h.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,b.ExpressionExpected);return this.accept(h.ParenthesisR)?this.finish(n):this.finish(n,b.RightParenthesisExpected)},t.prototype._parseFunctionIdentifier=function(){if(!this.peek(h.Ident))return null;var e=this.create(Ae);if(e.referenceTypes=[$.Function],this.acceptIdent("progid")){if(this.accept(h.Colon))for(;this.accept(h.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},t.prototype._parseFunctionArgument=function(){var e=this.create(wt);return e.setValue(this._parseExpr(!0))?this.finish(e):null},t.prototype._parseHexColor=function(){if(this.peekRegExp(h.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(xr);return this.consumeToken(),this.finish(e)}else return null},t}();function Fc(t,e){var n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null},t.prototype.findInScope=function(e,n){n===void 0&&(n=0);var r=e+n,i=Fc(this.children,function(a){return a.offset>r});if(i===0)return this;var s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this},t.prototype.addSymbol=function(e){this.symbols.push(e)},t.prototype.getSymbol=function(e,n){for(var r=0;r0&&(o.arguments=s),o}t.create=e;function n(r){var i=r;return w.defined(i)&&w.string(i.title)&&w.string(i.command)}t.is=n})(St||(St={}));var O;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){var a=s;return w.objectLiteral(a)&&w.string(a.newText)&&J.is(a.range)}t.is=i})(O||(O={}));var Ct;(function(t){function e(r,i,s){var a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){var i=r;return i!==void 0&&w.objectLiteral(i)&&w.string(i.label)&&(w.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(w.string(i.description)||i.description===void 0)}t.is=n})(Ct||(Ct={}));var ge;(function(t){function e(n){var r=n;return typeof r=="string"}t.is=e})(ge||(ge={}));var Xe;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){var a=s;return O.is(a)&&(Ct.is(a.annotationId)||ge.is(a.annotationId))}t.is=i})(Xe||(Xe={}));var jt;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){var i=r;return w.defined(i)&&kn.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(jt||(jt={}));var Bt;(function(t){function e(r,i,s){var a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){var i=r;return i&&i.kind==="create"&&w.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||w.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||w.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ge.is(i.annotationId))}t.is=n})(Bt||(Bt={}));var $t;(function(t){function e(r,i,s,a){var o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){var i=r;return i&&i.kind==="rename"&&w.string(i.oldUri)&&w.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||w.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||w.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ge.is(i.annotationId))}t.is=n})($t||($t={}));var qt;(function(t){function e(r,i,s){var a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){var i=r;return i&&i.kind==="delete"&&w.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||w.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||w.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ge.is(i.annotationId))}t.is=n})(qt||(qt={}));var zr;(function(t){function e(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return w.string(i.kind)?Bt.is(i)||$t.is(i)||qt.is(i):jt.is(i)}))}t.is=e})(zr||(zr={}));var Cn=function(){function t(e,n){this.edits=e,this.changeAnnotations=n}return t.prototype.insert=function(e,n,r){var i,s;if(r===void 0?i=O.insert(e,n):ge.is(r)?(s=r,i=Xe.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Xe.insert(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.replace=function(e,n,r){var i,s;if(r===void 0?i=O.replace(e,n):ge.is(r)?(s=r,i=Xe.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Xe.replace(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.delete=function(e,n){var r,i;if(n===void 0?r=O.del(e):ge.is(n)?(i=n,r=Xe.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Xe.del(e,i)),this.edits.push(r),i!==void 0)return i},t.prototype.add=function(e){this.edits.push(e)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),pa=function(){function t(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(e,n){var r;if(ge.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(n===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=n,this._size++,r},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}();(function(){function t(e){var n=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new pa(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(r){if(jt.is(r)){var i=new Cn(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(function(r){var i=new Cn(e.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(t.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}),t.prototype.getTextEditChange=function(e){if(kn.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:e.uri,version:e.version},r=this._textEditChanges[n.uri];if(!r){var i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new Cn(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[e];if(!r){var i=[];this._workspaceEdit.changes[e]=i,r=new Cn(i),this._textEditChanges[e]=r}return r}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new pa,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ct.is(n)||ge.is(n)?i=n:r=n;var s,a;if(i===void 0?s=Bt.create(e,r):(a=ge.is(i)?i:this._changeAnnotations.manage(i),s=Bt.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},t.prototype.renameFile=function(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Ct.is(r)||ge.is(r)?s=r:i=r;var a,o;if(s===void 0?a=$t.create(e,n,i):(o=ge.is(s)?s:this._changeAnnotations.manage(s),a=$t.create(e,n,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},t.prototype.deleteFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ct.is(n)||ge.is(n)?i=n:r=n;var s,a;if(i===void 0?s=qt.create(e,r):(a=ge.is(i)?i:this._changeAnnotations.manage(i),s=qt.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},t})();var ua;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){var i=r;return w.defined(i)&&w.string(i.uri)}t.is=n})(ua||(ua={}));var Ar;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return w.defined(i)&&w.string(i.uri)&&w.integer(i.version)}t.is=n})(Ar||(Ar={}));var kn;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return w.defined(i)&&w.string(i.uri)&&(i.version===null||w.integer(i.version))}t.is=n})(kn||(kn={}));var ma;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){var i=r;return w.defined(i)&&w.string(i.uri)&&w.string(i.languageId)&&w.integer(i.version)&&w.string(i.text)}t.is=n})(ma||(ma={}));var Pe;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(Pe||(Pe={})),function(t){function e(n){var r=n;return r===t.PlainText||r===t.Markdown}t.is=e}(Pe||(Pe={}));var Mr;(function(t){function e(n){var r=n;return w.objectLiteral(n)&&Pe.is(r.kind)&&w.string(r.value)}t.is=e})(Mr||(Mr={}));var L;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(L||(L={}));var Ce;(function(t){t.PlainText=1,t.Snippet=2})(Ce||(Ce={}));var tt;(function(t){t.Deprecated=1})(tt||(tt={}));var fa;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){var i=r;return i&&w.string(i.newText)&&J.is(i.insert)&&J.is(i.replace)}t.is=n})(fa||(fa={}));var ga;(function(t){t.asIs=1,t.adjustIndentation=2})(ga||(ga={}));var ba;(function(t){function e(n){return{label:n}}t.create=e})(ba||(ba={}));var va;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(va||(va={}));var Fn;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){var i=r;return w.string(i)||w.objectLiteral(i)&&w.string(i.language)&&w.string(i.value)}t.is=n})(Fn||(Fn={}));var ya;(function(t){function e(n){var r=n;return!!r&&w.objectLiteral(r)&&(Mr.is(r.contents)||Fn.is(r.contents)||w.typedArray(r.contents,Fn.is))&&(n.range===void 0||J.is(n.range))}t.is=e})(ya||(ya={}));var wa;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(wa||(wa={}));var xa;(function(t){function e(n,r){for(var i=[],s=2;s=0;d--){var p=c[d],u=s.offsetAt(p.range.start),m=s.offsetAt(p.range.end);if(m<=l)o=o.substring(0,u)+p.newText+o.substring(m,o.length);else throw new Error("Overlapping edit");l=u}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,c=s.slice(0,o),l=s.slice(o);i(c,a),i(l,a);for(var d=0,p=0,u=0;d0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets},t.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Se.create(0,e);for(;re?i=s:r=s+1}var a=r-1;return Se.create(a,e-n[a])},t.prototype.offsetAt=function(e){var n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;var r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(m){return m===!0||m===!1}t.boolean=i;function s(m){return e.call(m)==="[object String]"}t.string=s;function a(m){return e.call(m)==="[object Number]"}t.number=a;function o(m,g,x){return e.call(m)==="[object Number]"&&g<=m&&m<=x}t.numberRange=o;function c(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}t.integer=c;function l(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}t.uinteger=l;function d(m){return e.call(m)==="[object Function]"}t.func=d;function p(m){return m!==null&&typeof m=="object"}t.objectLiteral=p;function u(m,g){return Array.isArray(m)&&m.every(g)}t.typedArray=u})(w||(w={}));var Aa=function(){function t(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),t.prototype.getText=function(e){if(e){var n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content},t.prototype.update=function(e,n){for(var r=0,i=e;re?i=s:r=s+1}var a=r-1;return{line:a,character:e-n[a]}},t.prototype.offsetAt=function(e){var n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;var r=n[e.line],i=e.line+1c&&l.push(a.substring(c,m)),u.newText.length&&l.push(u.newText),c=i.offsetAt(u.range.end)}return l.push(a.substr(c)),l.join("")}t.applyEdits=r})(Ir||(Ir={}));function Tr(t,e){if(t.length<=1)return t;var n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Tr(r,e),Tr(i,e);for(var s=0,a=0,o=0;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function zc(t){var e=Pa(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Na;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Pe.Markdown,Pe.PlainText]}},hover:{contentFormat:[Pe.Markdown,Pe.PlainText]}}}})(Na||(Na={}));var Ht;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Ht||(Ht={}));var Ia;Ia=(()=>{var t={470:r=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,c){for(var l,d="",p=0,u=-1,m=0,g=0;g<=o.length;++g){if(g2){var x=d.lastIndexOf("/");if(x!==d.length-1){x===-1?(d="",p=0):p=(d=d.slice(0,x)).length-1-d.lastIndexOf("/"),u=g,m=0;continue}}else if(d.length===2||d.length===1){d="",p=0,u=g,m=0;continue}}c&&(d.length>0?d+="/..":d="..",p=2)}else d.length>0?d+="/"+o.slice(u+1,g):d=o.slice(u+1,g),p=g-u-1;u=g,m=0}else l===46&&m!==-1?++m:m=-1}return d}var a={resolve:function(){for(var o,c="",l=!1,d=arguments.length-1;d>=-1&&!l;d--){var p;d>=0?p=arguments[d]:(o===void 0&&(o=process.cwd()),p=o),i(p),p.length!==0&&(c=p+"/"+c,l=p.charCodeAt(0)===47)}return c=s(c,!l),l?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(o){if(i(o),o.length===0)return".";var c=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return(o=s(o,!c)).length!==0||c||(o="."),o.length>0&&l&&(o+="/"),c?"/"+o:o},isAbsolute:function(o){return i(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,c=0;c0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":a.normalize(o)},relative:function(o,c){if(i(o),i(c),o===c||(o=a.resolve(o))===(c=a.resolve(c)))return"";for(var l=1;lg){if(c.charCodeAt(u+S)===47)return c.slice(u+S+1);if(S===0)return c.slice(u+S)}else p>g&&(o.charCodeAt(l+S)===47?x=S:S===0&&(x=0));break}var D=o.charCodeAt(l+S);if(D!==c.charCodeAt(u+S))break;D===47&&(x=S)}var v="";for(S=l+x+1;S<=d;++S)S!==d&&o.charCodeAt(S)!==47||(v.length===0?v+="..":v+="/..");return v.length>0?v+c.slice(u+x):(u+=x,c.charCodeAt(u)===47&&++u,c.slice(u))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var c=o.charCodeAt(0),l=c===47,d=-1,p=!0,u=o.length-1;u>=1;--u)if((c=o.charCodeAt(u))===47){if(!p){d=u;break}}else p=!1;return d===-1?l?"/":".":l&&d===1?"//":o.slice(0,d)},basename:function(o,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');i(o);var l,d=0,p=-1,u=!0;if(c!==void 0&&c.length>0&&c.length<=o.length){if(c.length===o.length&&c===o)return"";var m=c.length-1,g=-1;for(l=o.length-1;l>=0;--l){var x=o.charCodeAt(l);if(x===47){if(!u){d=l+1;break}}else g===-1&&(u=!1,g=l+1),m>=0&&(x===c.charCodeAt(m)?--m==-1&&(p=l):(m=-1,p=g))}return d===p?p=g:p===-1&&(p=o.length),o.slice(d,p)}for(l=o.length-1;l>=0;--l)if(o.charCodeAt(l)===47){if(!u){d=l+1;break}}else p===-1&&(u=!1,p=l+1);return p===-1?"":o.slice(d,p)},extname:function(o){i(o);for(var c=-1,l=0,d=-1,p=!0,u=0,m=o.length-1;m>=0;--m){var g=o.charCodeAt(m);if(g!==47)d===-1&&(p=!1,d=m+1),g===46?c===-1?c=m:u!==1&&(u=1):c!==-1&&(u=-1);else if(!p){l=m+1;break}}return c===-1||d===-1||u===0||u===1&&c===d-1&&c===l+1?"":o.slice(c,d)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(c,l){var d=l.dir||l.root,p=l.base||(l.name||"")+(l.ext||"");return d?d===l.root?d+p:d+"/"+p:p}(0,o)},parse:function(o){i(o);var c={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return c;var l,d=o.charCodeAt(0),p=d===47;p?(c.root="/",l=1):l=0;for(var u=-1,m=0,g=-1,x=!0,S=o.length-1,D=0;S>=l;--S)if((d=o.charCodeAt(S))!==47)g===-1&&(x=!1,g=S+1),d===46?u===-1?u=S:D!==1&&(D=1):u!==-1&&(D=-1);else if(!x){m=S+1;break}return u===-1||g===-1||D===0||D===1&&u===g-1&&u===m+1?g!==-1&&(c.base=c.name=m===0&&p?o.slice(1,g):o.slice(m,g)):(m===0&&p?(c.name=o.slice(1,u),c.base=o.slice(1,g)):(c.name=o.slice(m,u),c.base=o.slice(m,g)),c.ext=o.slice(u,g)),m>0?c.dir=o.slice(0,m-1):p&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,r.exports=a},447:(r,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>D,Utils:()=>W}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var c,l,d=(c=function(R,C){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,z){E.__proto__=z}||function(E,z){for(var H in z)Object.prototype.hasOwnProperty.call(z,H)&&(E[H]=z[H])})(R,C)},function(R,C){function E(){this.constructor=R}c(R,C),R.prototype=C===null?Object.create(C):(E.prototype=C.prototype,new E)}),p=/^\w[\w\d+.-]*$/,u=/^\//,m=/^\/\//,g="",x="/",S=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,D=function(){function R(C,E,z,H,V,q){q===void 0&&(q=!1),typeof C=="object"?(this.scheme=C.scheme||g,this.authority=C.authority||g,this.path=C.path||g,this.query=C.query||g,this.fragment=C.fragment||g):(this.scheme=function(te,fe){return te||fe?te:"file"}(C,q),this.authority=E||g,this.path=function(te,fe){switch(te){case"https":case"http":case"file":fe?fe[0]!==x&&(fe=x+fe):fe=x}return fe}(this.scheme,z||g),this.query=H||g,this.fragment=V||g,function(te,fe){if(!te.scheme&&fe)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+te.authority+'", path: "'+te.path+'", query: "'+te.query+'", fragment: "'+te.fragment+'"}');if(te.scheme&&!p.test(te.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(te.path){if(te.authority){if(!u.test(te.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(m.test(te.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,q))}return R.isUri=function(C){return C instanceof R||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="function"&&typeof C.with=="function"&&typeof C.toString=="function"},Object.defineProperty(R.prototype,"fsPath",{get:function(){return T(this)},enumerable:!1,configurable:!0}),R.prototype.with=function(C){if(!C)return this;var E=C.scheme,z=C.authority,H=C.path,V=C.query,q=C.fragment;return E===void 0?E=this.scheme:E===null&&(E=g),z===void 0?z=this.authority:z===null&&(z=g),H===void 0?H=this.path:H===null&&(H=g),V===void 0?V=this.query:V===null&&(V=g),q===void 0?q=this.fragment:q===null&&(q=g),E===this.scheme&&z===this.authority&&H===this.path&&V===this.query&&q===this.fragment?this:new y(E,z,H,V,q)},R.parse=function(C,E){E===void 0&&(E=!1);var z=S.exec(C);return z?new y(z[2]||g,B(z[4]||g),B(z[5]||g),B(z[7]||g),B(z[9]||g),E):new y(g,g,g,g,g)},R.file=function(C){var E=g;if(a&&(C=C.replace(/\\/g,x)),C[0]===x&&C[1]===x){var z=C.indexOf(x,2);z===-1?(E=C.substring(2),C=x):(E=C.substring(2,z),C=C.substring(z)||x)}return new y("file",E,C,g,g)},R.from=function(C){return new y(C.scheme,C.authority,C.path,C.query,C.fragment)},R.prototype.toString=function(C){return C===void 0&&(C=!1),P(this,C)},R.prototype.toJSON=function(){return this},R.revive=function(C){if(C){if(C instanceof R)return C;var E=new y(C);return E._formatted=C.external,E._fsPath=C._sep===v?C.fsPath:null,E}return C},R}(),v=a?1:void 0,y=function(R){function C(){var E=R!==null&&R.apply(this,arguments)||this;return E._formatted=null,E._fsPath=null,E}return d(C,R),Object.defineProperty(C.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=T(this)),this._fsPath},enumerable:!1,configurable:!0}),C.prototype.toString=function(E){return E===void 0&&(E=!1),E?P(this,!0):(this._formatted||(this._formatted=P(this,!1)),this._formatted)},C.prototype.toJSON=function(){var E={$mid:1};return this._fsPath&&(E.fsPath=this._fsPath,E._sep=v),this._formatted&&(E.external=this._formatted),this.path&&(E.path=this.path),this.scheme&&(E.scheme=this.scheme),this.authority&&(E.authority=this.authority),this.query&&(E.query=this.query),this.fragment&&(E.fragment=this.fragment),E},C}(D),k=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function F(R,C){for(var E=void 0,z=-1,H=0;H=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===45||V===46||V===95||V===126||C&&V===47)z!==-1&&(E+=encodeURIComponent(R.substring(z,H)),z=-1),E!==void 0&&(E+=R.charAt(H));else{E===void 0&&(E=R.substr(0,H));var q=k[V];q!==void 0?(z!==-1&&(E+=encodeURIComponent(R.substring(z,H)),z=-1),E+=q):z===-1&&(z=H)}}return z!==-1&&(E+=encodeURIComponent(R.substring(z))),E!==void 0?E:R}function I(R){for(var C=void 0,E=0;E1&&R.scheme==="file"?"//"+R.authority+R.path:R.path.charCodeAt(0)===47&&(R.path.charCodeAt(1)>=65&&R.path.charCodeAt(1)<=90||R.path.charCodeAt(1)>=97&&R.path.charCodeAt(1)<=122)&&R.path.charCodeAt(2)===58?R.path[1].toLowerCase()+R.path.substr(2):R.path,a&&(E=E.replace(/\//g,"\\")),E}function P(R,C){var E=C?I:F,z="",H=R.scheme,V=R.authority,q=R.path,te=R.query,fe=R.fragment;if(H&&(z+=H,z+=":"),(V||H==="file")&&(z+=x,z+=x),V){var _e=V.indexOf("@");if(_e!==-1){var Ze=V.substr(0,_e);V=V.substr(_e+1),(_e=Ze.indexOf(":"))===-1?z+=E(Ze,!1):(z+=E(Ze.substr(0,_e),!1),z+=":",z+=E(Ze.substr(_e+1),!1)),z+="@"}(_e=(V=V.toLowerCase()).indexOf(":"))===-1?z+=E(V,!1):(z+=E(V.substr(0,_e),!1),z+=V.substr(_e))}if(q){if(q.length>=3&&q.charCodeAt(0)===47&&q.charCodeAt(2)===58)(Be=q.charCodeAt(1))>=65&&Be<=90&&(q="/"+String.fromCharCode(Be+32)+":"+q.substr(3));else if(q.length>=2&&q.charCodeAt(1)===58){var Be;(Be=q.charCodeAt(0))>=65&&Be<=90&&(q=String.fromCharCode(Be+32)+":"+q.substr(2))}z+=E(q,!0)}return te&&(z+="?",z+=E(te,!1)),fe&&(z+="#",z+=C?fe:F(fe,!1)),z}function j(R){try{return decodeURIComponent(R)}catch{return R.length>3?R.substr(0,3)+j(R.substr(3)):R}}var re=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(R){return R.match(re)?R.replace(re,function(C){return j(C)}):R}var W,le=s(470),ve=function(){for(var R=0,C=0,E=arguments.length;C{for(var s in i)n.o(i,s)&&!n.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:i[s]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n(447)})();const{URI:Lr,Utils:Wr}=Ia;var Ac=function(t,e){for(var n=0,r=e.length,i=t.length;n0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=0;a--){var o=this.nodePath[a];if(o instanceof vr)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof Is)o.parent instanceof Cr?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof yt){var c=o.findAParent(f.ExtendsReference,f.Ruleset);if(c)if(c.type===f.ExtendsReference)this.getCompletionsForExtendsReference(c,o,s);else{var l=c;this.getCompletionsForSelector(l,l&&l.isNested(),s)}}else if(o instanceof wt)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof gr)this.getCompletionsForDeclarations(o,s);else if(o instanceof pn)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof vt)this.getCompletionsForRuleSet(o,s);else if(o instanceof Cr)this.getCompletionsForInterpolation(o,s);else if(o instanceof dn)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof un)this.getCompletionsForMixinReference(o,s);else if(o instanceof Lt)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof wr)this.getCompletionsForSupports(o,s);else if(o instanceof Wt)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof Ot)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===f.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===f.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},t.prototype.isImportPathParent=function(e){return e===f.Import},t.prototype.finalize=function(e){return e},t.prototype.findInNodePath=function(){for(var e=[],n=0;n=0;r--){var i=this.nodePath[r];if(e.indexOf(i.type)!==-1)return i}return null},t.prototype.getCompletionsForDeclarationProperty=function(e,n){return this.getPropertyProposals(e,n)},t.prototype.getPropertyProposals=function(e,n){var r=this,i=this.isTriggerPropertyValueCompletionEnabled,s=this.isCompletePropertyWithSemicolonEnabled,a=this.cssDataManager.getProperties();return a.forEach(function(o){var c,l,d=!1;e?(c=r.getCompletionRange(e.getProperty()),l=o.name,Ee(e.colonPosition)||(l+=": ",d=!0)):(c=r.getCompletionRange(null),l=o.name+": ",d=!0),!e&&s&&(l+="$0;"),e&&!e.semicolonPosition&&s&&r.offset>=r.textDocument.offsetAt(c.end)&&(l+="$0;");var p={label:o.name,documentation:Je(o,r.doesSupportMarkdown()),tags:Gt(o)?[tt.Deprecated]:[],textEdit:O.replace(c,l),insertTextFormat:Ce.Snippet,kind:L.Property};o.restrictions||(d=!1),i&&d&&(p.command={title:"Suggest",command:"editor.action.triggerSuggest"});var u=typeof o.relevance=="number"?Math.min(Math.max(o.relevance,0),99):50,m=(255-u).toString(16),g=he(o.name,"-")?Oe.VendorPrefixed:Oe.Normal;p.sortText=g+"_"+m,n.items.push(p)}),this.completionParticipants.forEach(function(o){o.onCssProperty&&o.onCssProperty({propertyName:r.currentWord,range:r.defaultReplaceRange})}),n},Object.defineProperty(t.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),t.prototype.getCompletionsForDeclarationValue=function(e,n){for(var r=this,i=e.getFullPropertyName(),s=this.cssDataManager.getProperty(i),a=e.getValue()||null;a&&a.hasChildren();)a=a.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(g){g.onCssPropertyValue&&g.onCssPropertyValue({propertyName:i,propertyValue:r.currentWord,range:r.getCompletionRange(a)})}),s){if(s.restrictions)for(var o=0,c=s.restrictions;o=e.offset+2&&this.getVariableProposals(null,n),n},t.prototype.getVariableProposals=function(e,n){for(var r=this.getSymbolContext().findSymbolsAtOffset(this.offset,$.Variable),i=0,s=r;i0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===f.Term&&(n=n.getParent()),e.restrictions)for(var a=0,o=e.restrictions;a=r.end;if(i)return this.getCompletionForTopLevel(n);var s=!r||this.offset<=r.offset;return s?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)},t.prototype.getCompletionsForSelector=function(e,n,r){var i=this,s=this.findInNodePath(f.PseudoSelector,f.IdentifierSelector,f.ClassSelector,f.ElementNameSelector);!s&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=J.create(Se.create(this.position.line,this.position.character-this.currentWord.length),this.position));var a=this.cssDataManager.getPseudoClasses();a.forEach(function(S){var D=Yt(S.name),v={label:S.name,textEdit:O.replace(i.getCompletionRange(s),D),documentation:Je(S,i.doesSupportMarkdown()),tags:Gt(S)?[tt.Deprecated]:[],kind:L.Function,insertTextFormat:S.name!==D?Qe:void 0};he(S.name,":-")&&(v.sortText=Oe.VendorPrefixed),r.items.push(v)});var o=this.cssDataManager.getPseudoElements();if(o.forEach(function(S){var D=Yt(S.name),v={label:S.name,textEdit:O.replace(i.getCompletionRange(s),D),documentation:Je(S,i.doesSupportMarkdown()),tags:Gt(S)?[tt.Deprecated]:[],kind:L.Function,insertTextFormat:S.name!==D?Qe:void 0};he(S.name,"::-")&&(v.sortText=Oe.VendorPrefixed),r.items.push(v)}),!n){for(var c=0,l=Sc;c0){var D=g.substr(S.offset,S.length);return D.charAt(0)==="."&&!m[D]&&(m[D]=!0,r.items.push({label:D,textEdit:O.replace(i.getCompletionRange(s),D),kind:L.Keyword})),!1}return!0}),e&&e.isNested()){var x=e.getSelectors().findFirstChildBeforeOffset(this.offset);x&&e.getSelectors().getChildren().indexOf(x)===0&&this.getPropertyProposals(null,r)}return r},t.prototype.getCompletionsForDeclarations=function(e,n){if(!e||this.offset===e.offset)return n;var r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof br){var i=r;if(!Ee(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(Ee(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),n),n},t.prototype.getCompletionsForExpression=function(e,n){var r=e.getParent();if(r instanceof wt)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;var i=e.findParent(f.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;var s=e.findChildAtOffset(this.offset,!0);return s?s instanceof Sr||s instanceof Ae?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)},t.prototype.getCompletionsForFunctionArgument=function(e,n,r){var i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r},t.prototype.getCompletionsForFunctionDeclaration=function(e,n){var r=e.getDeclarations();return r&&this.offset>r.offset&&this.offsete.lParent&&(!Ee(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n},t.prototype.getCompletionsForSupports=function(e,n){var r=e.getDeclarations(),i=!r||this.offset<=r.offset;if(i){var s=e.findFirstChildBeforeOffset(this.offset);return s instanceof Wt?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)},t.prototype.getCompletionsForExtendsReference=function(e,n,r){return r},t.prototype.getCompletionForUriLiteralValue=function(e,n){var r,i,s;if(e.hasChildren()){var o=e.getChild(0);r=o.getText(),i=this.position,s=this.getCompletionRange(o)}else{r="",i=this.position;var a=this.textDocument.positionAt(e.offset+4);s=J.create(a,a)}return this.completionParticipants.forEach(function(c){c.onCssURILiteralValue&&c.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n},t.prototype.getCompletionForImportPath=function(e,n){var r=this;return this.completionParticipants.forEach(function(i){i.onCssImportPath&&i.onCssImportPath({pathValue:e.getText(),position:r.position,range:r.getCompletionRange(e)})}),n},t.prototype.hasCharacterAtPosition=function(e,n){var r=this.textDocument.getText();return e>=0&&e=0&&` \r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}function Oa(t){return t.toLowerCase()in fn||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}var Ua=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bc=Me(),Br=function(){function t(){this.parent=null,this.children=null,this.attributes=null}return t.prototype.findAttribute=function(e){if(this.attributes)for(var n=0,r=this.attributes;n"),this.writeLine(n,i.join(""))},t}(),Ue;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){var i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(Ue||(Ue={}));var $c=function(){function t(){this.id=0,this.attr=0,this.tag=0}return t}();function ja(t,e){for(var n=new Br,r=0,i=t.getChildren();r1){var l=e.cloneWithParent();n.addChild(l.findRoot()),n=l}n.append(a[c])}}break;case f.SelectorPlaceholder:if(s.matches("@at-root"))return n;case f.ElementNameSelector:var d=s.getText();n.addAttr("name",d==="*"?"element":De(d));break;case f.ClassSelector:n.addAttr("class",De(s.getText().substring(1)));break;case f.IdentifierSelector:n.addAttr("id",De(s.getText().substring(1)));break;case f.MixinDeclaration:n.addAttr("class",s.getName());break;case f.PseudoSelector:n.addAttr(De(s.getText()),"");break;case f.AttributeSelector:var p=s,u=p.getIdentifier();if(u){var m=p.getValue(),g=p.getOperator(),x=void 0;if(m&&g)switch(De(g.getText())){case"|=":x=Ue.remove(De(m.getText()))+"-…";break;case"^=":x=Ue.remove(De(m.getText()))+"…";break;case"$=":x="…"+Ue.remove(De(m.getText()));break;case"~=":x=" … "+Ue.remove(De(m.getText()))+" … ";break;case"*=":x="…"+Ue.remove(De(m.getText()))+"…";break;default:x=Ue.remove(De(m.getText()));break}n.addAttr(De(u.getText()),x)}break}}return n}function De(t){var e=new It;e.setSource(t);var n=e.scanUnquotedString();return n?n.text:t}var qc=function(){function t(e){this.cssDataManager=e}return t.prototype.selectorToMarkedString=function(e){var n=Yc(e);if(n){var r=new Va('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]},t.prototype.simpleSelectorToMarkedString=function(e){var n=ja(e),r=new Va('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r},t.prototype.isPseudoElementIdentifier=function(e){var n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1},t.prototype.selectorToSpecificityMarkedString=function(e){var n=this,r=function(s){for(var a=0,o=s.getChildren();a0&&r(c)}},i=new $c;return r(e),Bc("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",i.id,i.attr,i.tag)},t}(),Hc=function(){function t(e){this.prev=null,this.element=e}return t.prototype.processSelector=function(e){var n=null;if(!(this.element instanceof Ft)&&e.getChildren().some(function(d){return d.hasChildren()&&d.getChild(0).type===f.SelectorCombinator})){var r=this.element.findRoot();r.parent instanceof Ft&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(var i=0,s=e.getChildren();i=0;a--){var o=n[a].getSelectors().getChild(0);o&&s.processSelector(o)}return s.processSelector(t),e}var qr=function(){function t(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new qc(n)}return t.prototype.configure=function(e){this.defaultSettings=e},t.prototype.doHover=function(e,n,r,i){i===void 0&&(i=this.defaultSettings);function s(S){return J.create(e.positionAt(S.offset),e.positionAt(S.end))}for(var a=e.offsetAt(n),o=fr(r,a),c=null,l=0;l0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=s.length/2&&a.push({property:D.name,score:v})}),a.sort(function(D,v){return v.score-D.score||D.property.localeCompare(v.property)});for(var o=3,c=0,l=a;c=0;c--){var l=o[c];if(l instanceof We){var d=l.getProperty();if(d&&d.offset===s&&d.end===a){this.getFixesForUnknownProperty(e,d,r,i);return}}}},t}(),nh=function(){function t(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}return t}();function Jt(t,e,n,r){var i=t[e];i.value=n,n&&(na(i.properties,r)||i.properties.push(r))}function rh(t,e,n){Jt(t,"top",e,n),Jt(t,"right",e,n),Jt(t,"bottom",e,n),Jt(t,"left",e,n)}function me(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?Jt(t,e,n,r):rh(t,n,r)}function Yr(t,e,n){switch(e.length){case 1:me(t,void 0,e[0],n);break;case 2:me(t,"top",e[0],n),me(t,"bottom",e[0],n),me(t,"right",e[1],n),me(t,"left",e[1],n);break;case 3:me(t,"top",e[0],n),me(t,"right",e[1],n),me(t,"left",e[1],n),me(t,"bottom",e[2],n);break;case 4:me(t,"top",e[0],n),me(t,"right",e[1],n),me(t,"bottom",e[2],n),me(t,"left",e[3],n);break}}function Jr(t,e){for(var n=0,r=e;n"u"))switch(i.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=i;break;case"height":e.height=i;break;default:var a=i.fullPropertyName.split("-");switch(a[0]){case"border":switch(a[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(a[2]){case void 0:me(e,a[1],sh(s),i);break;case"width":me(e,a[1],Xt(s,!1),i);break;case"style":me(e,a[1],An(s,!0),i);break}break;case"width":Yr(e,Ya(s.getChildren(),!1),i);break;case"style":Yr(e,ih(s.getChildren(),!0),i);break}break;case"padding":a.length===1?Yr(e,Ya(s.getChildren(),!0),i):me(e,a[1],Xt(s,!0),i);break}break}}return e}var Ve=Me(),Ja=function(){function t(){this.data={}}return t.prototype.add=function(e,n,r){var i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)},t}(),oh=function(){function t(e,n,r){var i=this;this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new Ja,this.validProperties={};var s=n.getSetting(Zc.ValidProperties);Array.isArray(s)&&s.forEach(function(a){if(typeof a=="string"){var o=a.trim().toLowerCase();o.length&&(i.validProperties[o]=!0)}})}return t.entries=function(e,n,r,i,s){var a=new t(n,r,i);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)},t.prototype.isValidPropertyDeclaration=function(e){var n=e.fullPropertyName;return this.validProperties[n]},t.prototype.fetch=function(e,n){for(var r=[],i=0,s=e;i0)for(var x=this.fetch(r,"float"),S=0;S0)for(var x=this.fetch(r,"vertical-align"),S=0;S1)for(var I=0;I")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var n=this.createNode(f.Operator);return this.consumeToken(),this.finish(n)}return t.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var n=this.create(M);return this.consumeToken(),this.finish(n)}return t.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(h.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(n){var r=this._tryParseCustomPropertyDeclaration(n);if(r)return r;var i=this.create(We);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(h.Colon))return this.finish(i,b.ColonExpected,[h.Colon],n||[h.SemiColon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);var s=!1;if(i.setValue(this._parseExpr())&&(s=!0,i.addChild(this._parsePrio())),this.peek(h.CurlyL))i.setNestedProperties(this._parseNestedProperties());else if(!s)return this.finish(i,b.PropertyValueExpected);return this.peek(h.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseNestedProperties=function(){var n=this.create(Rs);return this._parseBody(n,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var n=this.create(Ot);if(this.consumeToken(),!n.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(n,b.SelectorExpected);for(;this.accept(h.Comma);)n.getSelectors().addChild(this._parseSimpleSelector());return this.accept(h.Exclamation)&&!this.acceptIdent("optional")?this.finish(n,b.UnknownKeyword):this.finish(n)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(f.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(h.Num)||this.accept(h.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var n=this.createNode(f.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(n)}else if(this.peekKeyword("@at-root")){var n=this.createNode(f.SelectorPlaceholder);return this.consumeToken(),this.finish(n)}return null},e.prototype._parseElementName=function(){var n=this.mark(),r=t.prototype._parseElementName.call(this);return r&&!this.hasWhitespace()&&this.peek(h.ParenthesisL)?(this.restoreAtMark(n),null):r},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||t.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var n=this.createNode(f.Debug);return this.consumeToken(),n.addChild(this._parseExpr()),this.finish(n)},e.prototype._parseControlStatement=function(n){return n===void 0&&(n=this._parseRuleSetDeclaration.bind(this)),this.peek(h.AtKeyword)?this._parseIfStatement(n)||this._parseForStatement(n)||this._parseEachStatement(n)||this._parseWhileStatement(n):null},e.prototype._parseIfStatement=function(n){return this.peekKeyword("@if")?this._internalParseIfStatement(n):null},e.prototype._internalParseIfStatement=function(n){var r=this.create(Ll);if(this.consumeToken(),!r.setExpression(this._parseExpr(!0)))return this.finish(r,b.ExpressionExpected);if(this._parseBody(r,n),this.acceptKeyword("@else")){if(this.peekIdent("if"))r.setElseClause(this._internalParseIfStatement(n));else if(this.peek(h.CurlyL)){var i=this.create(Vl);this._parseBody(i,n),r.setElseClause(i)}}return this.finish(r)},e.prototype._parseForStatement=function(n){if(!this.peekKeyword("@for"))return null;var r=this.create(Wl);return this.consumeToken(),r.setVariable(this._parseVariable())?this.acceptIdent("from")?r.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(r,ti.ThroughOrToExpected,[h.CurlyR]):r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,b.ExpressionExpected,[h.CurlyR]):this.finish(r,b.ExpressionExpected,[h.CurlyR]):this.finish(r,ti.FromExpected,[h.CurlyR]):this.finish(r,b.VariableNameExpected,[h.CurlyR])},e.prototype._parseEachStatement=function(n){if(!this.peekKeyword("@each"))return null;var r=this.create(Ol);this.consumeToken();var i=r.getVariables();if(!i.addChild(this._parseVariable()))return this.finish(r,b.VariableNameExpected,[h.CurlyR]);for(;this.accept(h.Comma);)if(!i.addChild(this._parseVariable()))return this.finish(r,b.VariableNameExpected,[h.CurlyR]);return this.finish(i),this.acceptIdent("in")?r.addChild(this._parseExpr())?this._parseBody(r,n):this.finish(r,b.ExpressionExpected,[h.CurlyR]):this.finish(r,ti.InExpected,[h.CurlyR])},e.prototype._parseWhileStatement=function(n){if(!this.peekKeyword("@while"))return null;var r=this.create(Ul);return this.consumeToken(),r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,b.ExpressionExpected,[h.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var n=this.create(dn);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([$.Function])))return this.finish(n,b.IdentifierExpected,[h.CurlyR]);if(!this.accept(h.ParenthesisL))return this.finish(n,b.LeftParenthesisExpected,[h.CurlyR]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,b.VariableNameExpected)}return this.accept(h.ParenthesisR)?this._parseBody(n,this._parseFunctionBodyDeclaration.bind(this)):this.finish(n,b.RightParenthesisExpected,[h.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var n=this.createNode(f.ReturnStatement);return this.consumeToken(),n.addChild(this._parseExpr())?this.finish(n):this.finish(n,b.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var n=this.create(Ut);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([$.Mixin])))return this.finish(n,b.IdentifierExpected,[h.CurlyR]);if(this.accept(h.ParenthesisL)){if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,b.VariableNameExpected)}if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected,[h.CurlyR])}return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var n=this.create(hn);return n.setIdentifier(this._parseVariable())?(this.accept(Pn),this.accept(h.Colon)&&!n.setDefaultValue(this._parseExpr(!0))?this.finish(n,b.VariableValueExpected,[],[h.Comma,h.ParenthesisR]):this.finish(n)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var n=this.create(nc);if(this.consumeToken(),this.accept(h.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,b.ExpressionExpected)}if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected)}return this.finish(n)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var n=this.create(un);this.consumeToken();var r=this._parseIdent([$.Mixin]);if(!n.setIdentifier(r))return this.finish(n,b.IdentifierExpected,[h.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var i=this._parseIdent([$.Mixin]);if(!i)return this.finish(n,b.IdentifierExpected,[h.CurlyR]);var s=this.create(Ws);r.referenceTypes=[$.Module],s.setIdentifier(r),n.setIdentifier(i),n.addChild(s)}if(this.accept(h.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,b.ExpressionExpected)}if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(h.CurlyL))&&n.setContent(this._parseMixinContentDeclaration()),this.finish(n)},e.prototype._parseMixinContentDeclaration=function(){var n=this.create(rc);if(this.acceptIdent("using")){if(!this.accept(h.ParenthesisL))return this.finish(n,b.LeftParenthesisExpected,[h.CurlyL]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,b.VariableNameExpected)}if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected,[h.CurlyL])}return this.peek(h.CurlyL)&&this._parseBody(n,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(n)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var n=this.create(wt),r=this.mark(),i=this._parseVariable();if(i)if(this.accept(h.Colon))n.setIdentifier(i);else{if(this.accept(Pn))return n.setValue(i),this.finish(n);this.restoreAtMark(r)}return n.setValue(this._parseExpr(!0))?(this.accept(Pn),n.addChild(this._parsePrio()),this.finish(n)):n.setValue(this._tryParsePrio())?this.finish(n):null},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(h.ParenthesisR)){this.restoreAtMark(n);var i=this.create(M);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e.prototype._parseOperation=function(){if(!this.peek(h.ParenthesisL))return null;var n=this.create(M);for(this.consumeToken();n.addChild(this._parseListElement());)this.accept(h.Comma);return this.accept(h.ParenthesisR)?this.finish(n):this.finish(n,b.RightParenthesisExpected)},e.prototype._parseListElement=function(){var n=this.create(ic),r=this._parseBinaryExpr();if(!r)return null;if(this.accept(h.Colon)){if(n.setKey(r),!n.setValue(this._parseBinaryExpr()))return this.finish(n,b.ExpressionExpected)}else n.setValue(r);return this.finish(n)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var n=this.create(Bl);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,b.StringLiteralExpected);if(!this.peek(h.SemiColon)&&!this.peek(h.EOF)){if(!this.peekRegExp(h.Ident,/as|with/))return this.finish(n,b.UnknownKeyword);if(this.acceptIdent("as")&&!n.setIdentifier(this._parseIdent([$.Module]))&&!this.acceptDelim("*"))return this.finish(n,b.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(h.ParenthesisL))return this.finish(n,b.LeftParenthesisExpected,[h.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,b.VariableNameExpected);for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,b.VariableNameExpected);if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected)}}return!this.accept(h.SemiColon)&&!this.accept(h.EOF)?this.finish(n,b.SemiColonExpected):this.finish(n)},e.prototype._parseModuleConfigDeclaration=function(){var n=this.create($l);return n.setIdentifier(this._parseVariable())?!this.accept(h.Colon)||!n.setValue(this._parseExpr(!0))?this.finish(n,b.VariableValueExpected,[],[h.Comma,h.ParenthesisR]):this.accept(h.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(n,b.UnknownKeyword):this.finish(n):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var n=this.create(ql);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,b.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(h.ParenthesisL))return this.finish(n,b.LeftParenthesisExpected,[h.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,b.VariableNameExpected);for(;this.accept(h.Comma)&&!this.peek(h.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,b.VariableNameExpected);if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected)}if(!this.peek(h.SemiColon)&&!this.peek(h.EOF)){if(!this.peekRegExp(h.Ident,/as|hide|show/))return this.finish(n,b.UnknownKeyword);if(this.acceptIdent("as")){var r=this._parseIdent([$.Forward]);if(!n.setIdentifier(r))return this.finish(n,b.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(n,b.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!n.addChild(this._parseForwardVisibility()))return this.finish(n,b.IdentifierOrVariableExpected)}return!this.accept(h.SemiColon)&&!this.accept(h.EOF)?this.finish(n,b.SemiColonExpected):this.finish(n)},e.prototype._parseForwardVisibility=function(){var n=this.create(Hl);for(n.setIdentifier(this._parseIdent());n.addChild(this._parseVariable()||this._parseIdent());)this.accept(h.Comma);return n.getChildren().length>1?n:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||t.prototype._parseSupportsCondition.call(this)},e}(_r),wh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=Me(),xh=function(t){wh(e,t);function e(n,r){var i=t.call(this,"$",n,r)||this;return no(e.scssModuleLoaders),no(e.scssModuleBuiltIns),i}return e.prototype.isImportPathParent=function(n){return n===f.Forward||n===f.Use||t.prototype.isImportPathParent.call(this,n)},e.prototype.getCompletionForImportPath=function(n,r){var i=n.getParent().type;if(i===f.Forward||i===f.Use)for(var s=0,a=e.scssModuleBuiltIns;s0){var n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` `,n.value+=e.references.map(function(r){return"["+r.name+"]("+r.url+")"}).join(" | "),e.documentation=n}})}var Sh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=47,Ch=10,kh=13,Fh=12,ni=96,ri=46,_h=h.CustomToken,ii=_h++,io=function(t){Sh(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.scanNext=function(n){var r=this.escapedJavaScript();return r!==null?this.finishToken(n,r):this.stream.advanceIfChars([ri,ri,ri])?this.finishToken(n,ii):t.prototype.scanNext.call(this,n)},e.prototype.comment=function(){return t.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([ro,ro])?(this.stream.advanceWhileChar(function(n){switch(n){case Ch:case kh:case Fh:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var n=this.stream.peekChar();return n===ni?(this.stream.advance(1),this.stream.advanceWhileChar(function(r){return r!==ni}),this.stream.advanceIfChar(ni)?h.EscapedJavaScript:h.BadEscapedJavaScript):null},e}(It),Eh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dh=function(t){Eh(e,t);function e(){return t.call(this,new io)||this}return e.prototype._parseStylesheetStatement=function(n){return n===void 0&&(n=!1),this.peek(h.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||t.prototype._parseStylesheetAtStatement.call(this,n):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var n=this.create(yr);if(this.consumeToken(),this.accept(h.ParenthesisL)){if(!this.accept(h.Ident))return this.finish(n,b.IdentifierExpected,[h.SemiColon]);do if(!this.accept(h.Comma))break;while(this.accept(h.Ident));if(!this.accept(h.ParenthesisR))return this.finish(n,b.RightParenthesisExpected,[h.SemiColon])}return!n.addChild(this._parseURILiteral())&&!n.addChild(this._parseStringLiteral())?this.finish(n,b.URIOrStringExpected,[h.SemiColon]):(!this.peek(h.SemiColon)&&!this.peek(h.EOF)&&n.setMedialist(this._parseMediaQueryList()),this.finish(n))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var n=this.createNode(f.Plugin);return this.consumeToken(),n.addChild(this._parseStringLiteral())?this.accept(h.SemiColon)?this.finish(n):this.finish(n,b.SemiColonExpected):this.finish(n,b.StringLiteralExpected)},e.prototype._parseMediaQuery=function(n){var r=t.prototype._parseMediaQuery.call(this,n);if(!r){var i=this.create(Ns);return i.addChild(this._parseVariable())?this.finish(i):null}return r},e.prototype._parseMediaDeclaration=function(n){return n===void 0&&(n=!1),this._tryParseRuleset(n)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(n)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(n){n===void 0&&(n=[]);var r=this.create(pn),i=this.mark();if(!r.setVariable(this._parseVariable(!0)))return null;if(this.accept(h.Colon)){if(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseDetachedRuleSet()))r.needsSemicolon=!1;else if(!r.setValue(this._parseExpr()))return this.finish(r,b.VariableValueExpected,[],n);r.addChild(this._parsePrio())}else return this.restoreAtMark(i),null;return this.peek(h.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)},e.prototype._parseDetachedRuleSet=function(){var n=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(h.ParenthesisL)){var r=this.create(Ut);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(h.Comma)||this.accept(h.SemiColon))&&!this.peek(h.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,b.IdentifierExpected,[],[h.ParenthesisR]);if(!this.accept(h.ParenthesisR))return this.restoreAtMark(n),null}else return this.restoreAtMark(n),null;if(!this.peek(h.CurlyL))return null;var i=this.create(ee);return this._parseBody(i,this._parseDetachedRuleSetBody.bind(this)),this.finish(i)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(n){if(!n.addChild(this._parseLookupValue()))return!1;for(var r=!1;this.peek(h.BracketL)&&(r=!0),!!n.addChild(this._parseLookupValue());)r=!1;return!r},e.prototype._parseLookupValue=function(){var n=this.create(M),r=this.mark();return this.accept(h.BracketL)?(n.addChild(this._parseVariable(!1,!0))||n.addChild(this._parsePropertyIdentifier()))&&this.accept(h.BracketR)||this.accept(h.BracketR)?n:(this.restoreAtMark(r),null):(this.restoreAtMark(r),null)},e.prototype._parseVariable=function(n,r){n===void 0&&(n=!1),r===void 0&&(r=!1);var i=!n&&this.peekDelim("$");if(!this.peekDelim("@")&&!i&&!this.peek(h.AtKeyword))return null;for(var s=this.create(kr),a=this.mark();this.acceptDelim("@")||!n&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(a),null;return!this.accept(h.AtKeyword)&&!this.accept(h.Ident)?(this.restoreAtMark(a),null):!r&&this.peek(h.BracketL)&&!this._addLookupChildren(s)?(this.restoreAtMark(a),null):s},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||t.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(h.EscapedJavaScript)||this.peek(h.BadEscapedJavaScript)){var n=this.createNode(f.EscapedValue);return this.consumeToken(),this.finish(n)}if(this.peekDelim("~")){var n=this.createNode(f.EscapedValue);return this.consumeToken(),this.accept(h.String)||this.accept(h.EscapedJavaScript)?this.finish(n):this.finish(n,b.TermExpected)}return null},e.prototype._parseOperator=function(){var n=this._parseGuardOperator();return n||t.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var n=this.createNode(f.Operator);return this.consumeToken(),this.acceptDelim("="),n}else if(this.peekDelim("=")){var n=this.createNode(f.Operator);return this.consumeToken(),this.acceptDelim("<"),n}else if(this.peekDelim("<")){var n=this.createNode(f.Operator);return this.consumeToken(),this.acceptDelim("="),n}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(h.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([$.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||t.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(n){var r=this.create(Tt),i=!1;for(n&&(i=r.addChild(this._parseCombinator()));r.addChild(this._parseSimpleSelector());){i=!0;var s=this.mark();if(r.addChild(this._parseGuard())&&this.peek(h.CurlyL))break;this.restoreAtMark(s),r.addChild(this._parseCombinator())}return i?this.finish(r):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(f.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(h.Num)||this.accept(h.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var n=this.createNode(f.SelectorInterpolation),r=this._acceptInterpolatedIdent(n);return r?this.finish(n):null},e.prototype._parsePropertyIdentifier=function(n){n===void 0&&(n=!1);var r=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,r))return null;var i=this.mark(),s=this.create(Ae);s.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var a=!1;return n?s.isCustomProperty?a=s.addChild(this._parseIdent()):a=s.addChild(this._parseRegexp(r)):s.isCustomProperty?a=this._acceptInterpolatedIdent(s):a=this._acceptInterpolatedIdent(s,r),a?(!n&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(s)):(this.restoreAtMark(i),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(h.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(n,r){for(var i=this,s=!1,a=function(){var c=i.mark();return i.acceptDelim("-")&&(i.hasWhitespace()||i.acceptDelim("-"),i.hasWhitespace())?(i.restoreAtMark(c),null):i._parseInterpolation()},o=r?function(){return i.acceptRegexp(r)}:function(){return i.accept(h.Ident)};(o()||n.addChild(this._parseInterpolation()||this.try(a)))&&(s=!0,!this.hasWhitespace()););return s},e.prototype._parseInterpolation=function(){var n=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var r=this.createNode(f.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(h.CurlyL)?(this.restoreAtMark(n),null):r.addChild(this._parseIdent())?this.accept(h.CurlyR)?this.finish(r):this.finish(r,b.RightCurlyExpected):this.finish(r,b.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var n=this.mark(),r=this.create(Ut);if(!r.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(h.ParenthesisL))return this.restoreAtMark(n),null;if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(h.Comma)||this.accept(h.SemiColon))&&!this.peek(h.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,b.IdentifierExpected,[],[h.ParenthesisR]);return this.accept(h.ParenthesisR)?(r.setGuard(this._parseGuard()),this.peek(h.CurlyL)?this._parseBody(r,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(n),null)):(this.restoreAtMark(n),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var n;if(this.peekDelim("#")||this.peekDelim(".")){if(n=this.create(Ae),this.consumeToken(),this.hasWhitespace()||!n.addChild(this._parseIdent()))return null}else if(this.peek(h.Hash))n=this.create(Ae),this.consumeToken();else return null;return n.referenceTypes=[$.Mixin],this.finish(n)},e.prototype._parsePseudo=function(){if(!this.peek(h.Colon))return null;var n=this.mark(),r=this.create(Ot);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(r):(this.restoreAtMark(n),t.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var n=this.mark(),r=this.create(Ot);return this.consumeToken(),this.hasWhitespace()||!this.accept(h.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(n),null):this._completeExtends(r)},e.prototype._completeExtends=function(n){if(!this.accept(h.ParenthesisL))return this.finish(n,b.LeftParenthesisExpected);var r=n.getSelectors();if(!r.addChild(this._parseSelector(!0)))return this.finish(n,b.SelectorExpected);for(;this.accept(h.Comma);)if(!r.addChild(this._parseSelector(!0)))return this.finish(n,b.SelectorExpected);return this.accept(h.ParenthesisR)?this.finish(n):this.finish(n,b.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(h.AtKeyword))return null;var n=this.mark(),r=this.create(un);return r.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(h.ParenthesisL))?(this.restoreAtMark(n),null):this.accept(h.ParenthesisR)?this.finish(r):this.finish(r,b.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(n){n===void 0&&(n=!0);for(var r=this.mark(),i=this.create(un),s=this._parseMixinDeclarationIdentifier();s;){this.acceptDelim(">");var a=this._parseMixinDeclarationIdentifier();if(a)i.getNamespaces().addChild(s),s=a;else break}if(!i.setIdentifier(s))return this.restoreAtMark(r),null;var o=!1;if(this.accept(h.ParenthesisL)){if(o=!0,i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(h.Comma)||this.accept(h.SemiColon))&&!this.peek(h.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,b.ExpressionExpected)}if(!this.accept(h.ParenthesisR))return this.finish(i,b.RightParenthesisExpected);s.referenceTypes=[$.Mixin]}else s.referenceTypes=[$.Mixin,$.Rule];return this.peek(h.BracketL)?n||this._addLookupChildren(i):i.addChild(this._parsePrio()),!o&&!this.peek(h.SemiColon)&&!this.peek(h.CurlyR)&&!this.peek(h.EOF)?(this.restoreAtMark(r),null):this.finish(i)},e.prototype._parseMixinArgument=function(){var n=this.create(wt),r=this.mark(),i=this._parseVariable();return i&&(this.accept(h.Colon)?n.setIdentifier(i):this.restoreAtMark(r)),n.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(n):(this.restoreAtMark(r),null)},e.prototype._parseMixinParameter=function(){var n=this.create(hn);if(this.peekKeyword("@rest")){var r=this.create(M);return this.consumeToken(),this.accept(ii)?(n.setIdentifier(this.finish(r)),this.finish(n)):this.finish(n,b.DotExpected,[],[h.Comma,h.ParenthesisR])}if(this.peek(ii)){var i=this.create(M);return this.consumeToken(),n.setIdentifier(this.finish(i)),this.finish(n)}var s=!1;return n.setIdentifier(this._parseVariable())&&(this.accept(h.Colon),s=!0),!n.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!s?null:this.finish(n)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var n=this.create(sc);if(this.consumeToken(),n.isNegated=this.acceptIdent("not"),!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,b.ConditionExpected);for(;this.acceptIdent("and")||this.accept(h.Comma);)if(!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,b.ConditionExpected);return this.finish(n)},e.prototype._parseGuardCondition=function(){if(!this.peek(h.ParenthesisL))return null;var n=this.create(ac);return this.consumeToken(),n.addChild(this._parseExpr()),this.accept(h.ParenthesisR)?this.finish(n):this.finish(n,b.RightParenthesisExpected)},e.prototype._parseFunction=function(){var n=this.mark(),r=this.create(Lt);if(!r.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(h.ParenthesisL))return this.restoreAtMark(n),null;if(r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(h.Comma)||this.accept(h.SemiColon))&&!this.peek(h.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,b.ExpressionExpected)}return this.accept(h.ParenthesisR)?this.finish(r):this.finish(r,b.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var n=this.create(Ae);return n.referenceTypes=[$.Function],this.consumeToken(),this.finish(n)}return t.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(h.ParenthesisR)){this.restoreAtMark(n);var i=this.create(M);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e}(_r),Rh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=Me(),zh=function(t){Rh(e,t);function e(n,r){return t.call(this,"@",n,r)||this}return e.prototype.createFunctionProposals=function(n,r,i,s){for(var a=0,o=n;a 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:N("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:N("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:N("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:N("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:N("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:N("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:N("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:N("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:N("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:N("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:N("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:N("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:N("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:N("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:N("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:N("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:N("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:N("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:N("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:N("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:N("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:N("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:N("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:N("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:N("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:N("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:N("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:N("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:N("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:N("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:N("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:N("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:N("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:N("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:N("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:N("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:N("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],e}(jr);function Ah(t,e){var n=Mh(t);return Ph(n,e)}function Mh(t){function e(p){return t.positionAt(p.offset).line}function n(p){return t.positionAt(p.offset+p.len).line}function r(){switch(t.languageId){case"scss":return new to;case"less":return new io;default:return new It}}function i(p,u){var m=e(p),g=n(p);return m!==g?{startLine:m,endLine:g,kind:u}:null}var s=[],a=[],o=r();o.ignoreComment=!1,o.setSource(t.getText());for(var c=o.scan(),l=null,d=function(){switch(c.type){case h.CurlyL:case Mn:{a.push({line:e(c),type:"brace",isStart:!0});break}case h.CurlyR:{if(a.length!==0){var p=so(a,"brace");if(!p)break;var u=n(c);p.type==="brace"&&(l&&n(l)!==u&&u--,p.line!==u&&s.push({startLine:p.line,endLine:u,kind:void 0}))}break}case h.Comment:{var m=function(D){return D==="#region"?{line:e(c),type:"comment",isStart:!0}:{line:n(c),type:"comment",isStart:!1}},g=function(D){var v=D.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(v)return m(v[1]);if(t.languageId==="scss"||t.languageId==="less"){var y=D.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(y)return m(y[1])}return null},x=g(c);if(x)if(x.isStart)a.push(x);else{var p=so(a,"comment");if(!p)break;p.type==="comment"&&p.line!==x.line&&s.push({startLine:p.line,endLine:x.line,kind:"region"})}else{var S=i(c,"comment");S&&s.push(S)}break}}l=c,c=o.scan()};c.type!==h.EOF;)d();return s}function so(t,e){if(t.length===0)return null;for(var n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function Ph(t,e){var n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort(function(a,o){var c=a.startLine-o.startLine;return c===0&&(c=a.endLine-o.endLine),c}),i=[],s=-1;return r.forEach(function(a){a.startLine && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."}],syntax:"normal | | | ? ",relevance:60,description:"Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",values:[{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"normal | stretch | | [ ? ]",relevance:84,description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:51,description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:52,description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",values:[{name:"auto",description:"Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"auto | normal | stretch | | ? ",relevance:71,description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert",relevance:52,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:81,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",syntax:"