var Wm=Object.defineProperty;var Vm=(vt,He,Ge)=>He in vt?Wm(vt,He,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):vt[He]=Ge;var bt=(vt,He,Ge)=>Vm(vt,typeof He!="symbol"?He+"":He,Ge);(function(){"use strict";class vt{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Rt.isErrorNoTelemetry(t)?new Rt(t.message+` `+t.stack):new Error(t.message+` `+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const He=new vt;function Ge(e){Nc(e)||He.onUnexpectedError(e)}function us(e){if(e instanceof Error){const{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:Rt.isErrorNoTelemetry(e)}}return e}const br="Canceled";function Nc(e){return e instanceof Ic?!0:e instanceof Error&&e.name===br&&e.message===br}class Ic extends Error{constructor(){super(br),this.name=this.message}}class Rt extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Rt)return t;const n=new Rt;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}}class Te extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Te.prototype)}}function Ac(e,t){const n=this;let r=!1,i;return function(){return r||(r=!0,i=e.apply(n,arguments)),i}}var Fn;(function(e){function t(C){return C&&typeof C=="object"&&typeof C[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(C){yield C}e.single=i;function s(C){return t(C)?C:i(C)}e.wrap=s;function a(C){return C||n}e.from=a;function*l(C){for(let I=C.length-1;I>=0;I--)yield C[I]}e.reverse=l;function o(C){return!C||C[Symbol.iterator]().next().done===!0}e.isEmpty=o;function c(C){return C[Symbol.iterator]().next().value}e.first=c;function d(C,I){for(const D of C)if(I(D))return!0;return!1}e.some=d;function u(C,I){for(const D of C)if(I(D))return D}e.find=u;function*f(C,I){for(const D of C)I(D)&&(yield D)}e.filter=f;function*m(C,I){let D=0;for(const L of C)yield I(L,D++)}e.map=m;function*w(...C){for(const I of C)yield*I}e.concat=w;function y(C,I,D){let L=D;for(const O of C)L=I(L,O);return L}e.reduce=y;function*E(C,I,D=C.length){for(I<0&&(I+=C.length),D<0?D+=C.length:D>C.length&&(D=C.length);I1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Mc(...e){return Rn(()=>ps(e))}function Rn(e){return{dispose:Ac(()=>{e()})}}class Dt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ps(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Dt.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(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&this._toDispose.delete(t)}}Dt.DISABLE_DISPOSED_WARNING=!1;class Zt{constructor(){this._store=new Dt,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Zt.None=Object.freeze({dispose(){}});let ie=class ls{constructor(t){this.element=t,this.next=ls.Undefined,this.prev=ls.Undefined}};ie.Undefined=new ie(void 0);class Lc{constructor(){this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ie.Undefined}clear(){let t=this._first;for(;t!==ie.Undefined;){const n=t.next;t.prev=ie.Undefined,t.next=ie.Undefined,t=n}this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new ie(t);if(this._first===ie.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!==ie.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==ie.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==ie.Undefined&&t.next!==ie.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===ie.Undefined&&t.next===ie.Undefined?(this._first=ie.Undefined,this._last=ie.Undefined):t.next===ie.Undefined?(this._last=this._last.prev,this._last.next=ie.Undefined):t.prev===ie.Undefined&&(this._first=this._first.next,this._first.prev=ie.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==ie.Undefined;)yield t.element,t=t.next}}const zc=globalThis.performance&&typeof globalThis.performance.now=="function";class Dn{static create(t){return new Dn(t)}constructor(t){this._now=zc&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var vr;(function(e){e.None=()=>Zt.None;function t(_,v){return u(_,()=>{},0,void 0,!0,void 0,v)}e.defer=t;function n(_){return(v,k=null,F)=>{let A=!1,M;return M=_(P=>{if(!A)return M?M.dispose():A=!0,v.call(k,P)},null,F),A&&M.dispose(),M}}e.once=n;function r(_,v,k){return c((F,A=null,M)=>_(P=>F.call(A,v(P)),null,M),k)}e.map=r;function i(_,v,k){return c((F,A=null,M)=>_(P=>{v(P),F.call(A,P)},null,M),k)}e.forEach=i;function s(_,v,k){return c((F,A=null,M)=>_(P=>v(P)&&F.call(A,P),null,M),k)}e.filter=s;function a(_){return _}e.signal=a;function l(..._){return(v,k=null,F)=>{const A=Mc(..._.map(M=>M(P=>v.call(k,P))));return d(A,F)}}e.any=l;function o(_,v,k,F){let A=k;return r(_,M=>(A=v(A,M),A),F)}e.reduce=o;function c(_,v){let k;const F={onWillAddFirstListener(){k=_(A.fire,A)},onDidRemoveLastListener(){k==null||k.dispose()}},A=new Ae(F);return v==null||v.add(A),A.event}function d(_,v){return v instanceof Array?v.push(_):v&&v.add(_),_}function u(_,v,k=100,F=!1,A=!1,M,P){let Q,J,Y,Ee=0,rt;const mr={leakWarningThreshold:M,onWillAddFirstListener(){Q=_(os=>{Ee++,J=v(J,os),F&&!Y&&(Kt.fire(J),J=void 0),rt=()=>{const Om=J;J=void 0,Y=void 0,(!F||Ee>1)&&Kt.fire(Om),Ee=0},typeof k=="number"?(clearTimeout(Y),Y=setTimeout(rt,k)):Y===void 0&&(Y=0,queueMicrotask(rt))})},onWillRemoveListener(){A&&Ee>0&&(rt==null||rt())},onDidRemoveLastListener(){rt=void 0,Q.dispose()}},Kt=new Ae(mr);return P==null||P.add(Kt),Kt.event}e.debounce=u;function f(_,v=0,k){return e.debounce(_,(F,A)=>F?(F.push(A),F):[A],v,void 0,!0,void 0,k)}e.accumulate=f;function m(_,v=(F,A)=>F===A,k){let F=!0,A;return s(_,M=>{const P=F||!v(M,A);return F=!1,A=M,P},k)}e.latch=m;function w(_,v,k){return[e.filter(_,v,k),e.filter(_,F=>!v(F),k)]}e.split=w;function y(_,v=!1,k=[],F){let A=k.slice(),M=_(J=>{A?A.push(J):Q.fire(J)});F&&F.add(M);const P=()=>{A==null||A.forEach(J=>Q.fire(J)),A=null},Q=new Ae({onWillAddFirstListener(){M||(M=_(J=>Q.fire(J)),F&&F.add(M))},onDidAddFirstListener(){A&&(v?setTimeout(P):P())},onDidRemoveLastListener(){M&&M.dispose(),M=null}});return F&&F.add(Q),Q.event}e.buffer=y;function E(_,v){return(F,A,M)=>{const P=v(new N);return _(function(Q){const J=P.evaluate(Q);J!==R&&F.call(A,J)},void 0,M)}}e.chain=E;const R=Symbol("HaltChainable");class N{constructor(){this.steps=[]}map(v){return this.steps.push(v),this}forEach(v){return this.steps.push(k=>(v(k),k)),this}filter(v){return this.steps.push(k=>v(k)?k:R),this}reduce(v,k){let F=k;return this.steps.push(A=>(F=v(F,A),F)),this}latch(v=(k,F)=>k===F){let k=!0,F;return this.steps.push(A=>{const M=k||!v(A,F);return k=!1,F=A,M?A:R}),this}evaluate(v){for(const k of this.steps)if(v=k(v),v===R)break;return v}}function C(_,v,k=F=>F){const F=(...Q)=>P.fire(k(...Q)),A=()=>_.on(v,F),M=()=>_.removeListener(v,F),P=new Ae({onWillAddFirstListener:A,onDidRemoveLastListener:M});return P.event}e.fromNodeEventEmitter=C;function I(_,v,k=F=>F){const F=(...Q)=>P.fire(k(...Q)),A=()=>_.addEventListener(v,F),M=()=>_.removeEventListener(v,F),P=new Ae({onWillAddFirstListener:A,onDidRemoveLastListener:M});return P.event}e.fromDOMEventEmitter=I;function D(_){return new Promise(v=>n(_)(v))}e.toPromise=D;function L(_){const v=new Ae;return _.then(k=>{v.fire(k)},()=>{v.fire(void 0)}).finally(()=>{v.dispose()}),v.event}e.fromPromise=L;function O(_,v,k){return v(k),_(F=>v(F))}e.runAndSubscribe=O;class z{constructor(v,k){this._observable=v,this._counter=0,this._hasChanged=!1;const F={onWillAddFirstListener:()=>{v.addObserver(this)},onDidRemoveLastListener:()=>{v.removeObserver(this)}};this.emitter=new Ae(F),k&&k.add(this.emitter)}beginUpdate(v){this._counter++}handlePossibleChange(v){}handleChange(v,k){this._hasChanged=!0}endUpdate(v){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function q(_,v){return new z(_,v).emitter.event}e.fromObservable=q;function K(_){return(v,k,F)=>{let A=0,M=!1;const P={beginUpdate(){A++},endUpdate(){A--,A===0&&(_.reportChanges(),M&&(M=!1,v.call(k)))},handlePossibleChange(){},handleChange(){M=!0}};_.addObserver(P),_.reportChanges();const Q={dispose(){_.removeObserver(P)}};return F instanceof Dt?F.add(Q):Array.isArray(F)&&F.push(Q),Q}}e.fromObservableLight=K})(vr||(vr={}));class Nt{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Nt._idPool++}`,Nt.all.add(this)}start(t){this._stopWatch=new Dn,this.listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}}Nt.all=new Set,Nt._idPool=0;let Pc=-1;class Tc{constructor(t,n,r=Math.random().toString(18).slice(2,5)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){var t;(t=this._stacks)===null||t===void 0||t.clear()}check(t,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(const[r,i]of this._stacks)(!t||n{var s,a,l,o,c,d,u;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const y=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(y);const E=(s=this._leakageMon.getMostFrequentStack())!==null&&s!==void 0?s:["UNKNOWN stack",-1],R=new Wc(`${y}. HINT: Stack shows most frequent listener (${E[1]}-times)`,E[0]);return(((a=this._options)===null||a===void 0?void 0:a.onListenerError)||Ge)(R),Zt.None}if(this._disposed)return Zt.None;r&&(n=n.bind(r));const f=new yr(n);let m;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(f.stack=wr.create(),m=this._leakageMon.check(f.stack,this._size+1)),this._listeners?this._listeners instanceof yr?((u=this._deliveryQueue)!==null&&u!==void 0||(this._deliveryQueue=new Uc),this._listeners=[this._listeners,f]):this._listeners.push(f):((o=(l=this._options)===null||l===void 0?void 0:l.onWillAddFirstListener)===null||o===void 0||o.call(l,this),this._listeners=f,(d=(c=this._options)===null||c===void 0?void 0:c.onDidAddFirstListener)===null||d===void 0||d.call(c,this)),this._size++;const w=Rn(()=>{m==null||m(),this._removeListener(f)});return i instanceof Dt?i.add(w):Array.isArray(i)&&i.push(w),w}),this._event}_removeListener(t){var n,r,i,s;if((r=(n=this._options)===null||n===void 0?void 0:n.onWillRemoveListener)===null||r===void 0||r.call(n,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(s=(i=this._options)===null||i===void 0?void 0:i.onDidRemoveLastListener)===null||s===void 0||s.call(i,this),this._size=0;return}const a=this._listeners,l=a.indexOf(t);if(l===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,a[l]=void 0;const o=this._deliveryQueue.current===this;if(this._size*Vc<=a.length){let c=0;for(let d=0;d0}}class Uc{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function $c(e){return typeof e=="string"}function Bc(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function xr(e){const t=[];for(const n of Bc(e))typeof e[n]=="function"&&t.push(n);return t}function qc(e,t){const n=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(const i of e)r[i]=n(i);return r}let jc=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function Hc(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=t[s];let l=r;return typeof a=="string"?l=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(l=String(a)),l}),jc&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function ee(e,t,...n){return Hc(t,n)}function Bm(e){}var Sr,Cr;const It="en";let _r=!1,kr=!1,Er=!1,Nn,Fr=It,ms=It,Gc,Me;const wt=globalThis;let fe;typeof wt.vscode<"u"&&typeof wt.vscode.process<"u"?fe=wt.vscode.process:typeof process<"u"&&typeof((Sr=process==null?void 0:process.versions)===null||Sr===void 0?void 0:Sr.node)=="string"&&(fe=process);const Jc=typeof((Cr=fe==null?void 0:fe.versions)===null||Cr===void 0?void 0:Cr.electron)=="string"&&(fe==null?void 0:fe.type)==="renderer";if(typeof fe=="object"){_r=fe.platform==="win32",kr=fe.platform==="darwin",Er=fe.platform==="linux",Er&&fe.env.SNAP&&fe.env.SNAP_REVISION,fe.env.CI||fe.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Nn=It,Fr=It;const e=fe.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];Nn=t.locale,ms=t.osLocale,Fr=n||It,Gc=t._translationsConfigFile}catch{}}else typeof navigator=="object"&&!Jc?(Me=navigator.userAgent,_r=Me.indexOf("Windows")>=0,kr=Me.indexOf("Macintosh")>=0,(Me.indexOf("Macintosh")>=0||Me.indexOf("iPad")>=0||Me.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Er=Me.indexOf("Linux")>=0,(Me==null?void 0:Me.indexOf("Mobi"))>=0,ee({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),Nn=It,Fr=Nn,ms=navigator.language):console.error("Unable to resolve platform.");const en=_r,Xc=kr,Oe=Me,Yc=typeof wt.postMessage=="function"&&!wt.importScripts;(()=>{if(Yc){const e=[];wt.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{const r=++t;e.push({id:r,callback:n}),wt.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();const Qc=!!(Oe&&Oe.indexOf("Chrome")>=0);Oe&&Oe.indexOf("Firefox")>=0,!Qc&&Oe&&Oe.indexOf("Safari")>=0,Oe&&Oe.indexOf("Edg/")>=0,Oe&&Oe.indexOf("Android")>=0;function Kc(e){return e}class Zc{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=Kc):(this._fn=n,this._computeKey=t.getCacheKey)}get(t){const n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(t)),this.lastCache}}class fs{constructor(t){this.executor=t,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var At;function eh(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function th(e){return e.split(/\r\n|\r|\n/)}function nh(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function gs(e){return e>=65&&e<=90}function Rr(e){return 55296<=e&&e<=56319}function ih(e){return 56320<=e&&e<=57343}function sh(e,t){return(e-55296<<10)+(t-56320)+65536}function ah(e,t,n){const r=e.charCodeAt(n);if(Rr(r)&&n+1JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),yt.cache=new Zc({getCacheKey:JSON.stringify},e=>{function t(c){const d=new Map;for(let u=0;u!c.startsWith("_")&&c in i);s.length===0&&(s=["_default"]);let a;for(const c of s){const d=t(i[c]);a=r(a,d)}const l=t(i._common),o=n(l,a);return new At(o)}),yt._locales=new fs(()=>Object.keys(At.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));class it{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(it.getRawData())),this._data}static isInvisibleCharacter(t){return it.getData().has(t)}static get codePoints(){return it.getData()}}it._data=void 0;const ch="$initialize";class hh{constructor(t,n,r,i){this.vsWorker=t,this.req=n,this.method=r,this.args=i,this.type=0}}class bs{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}}class dh{constructor(t,n,r,i){this.vsWorker=t,this.req=n,this.eventName=r,this.arg=i,this.type=2}}class uh{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}}class ph{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}}class mh{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}sendMessage(t,n){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new hh(this._workerId,r,t,n))})}listen(t,n){let r=null;const i=new Ae({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new dh(this._workerId,r,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new ph(this._workerId,r)),r=null}});return i.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;t.err.$isError&&(r=new Error,r.name=t.err.name,r.message=t.err.message,r.stack=t.err.stack),n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){const n=t.req;this._handler.handleMessage(t.method,t.args).then(i=>{this._send(new bs(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=us(i.detail)),this._send(new bs(this._workerId,n,void 0,us(i)))})}_handleSubscribeEventMessage(t){const n=t.req,r=this._handler.handleEvent(t.eventName,t.arg)(i=>{this._send(new uh(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){const n=[];if(t.type===0)for(let r=0;rfunction(){const l=Array.prototype.slice.call(arguments,0);return t(a,l)},i=a=>function(l){return n(a,l)},s={};for(const a of e){if(ws(a)){s[a]=i(a);continue}if(vs(a)){s[a]=n(a,void 0);continue}s[a]=r(a)}return s}class gh{constructor(t,n){this._requestHandlerFactory=n,this._requestHandler=null,this._protocol=new mh({sendMessage:(r,i)=>{t(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i),handleEvent:(r,i)=>this._handleEvent(r,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===ch)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}_handleEvent(t,n){if(!this._requestHandler)throw new Error("Missing requestHandler");if(ws(t)){const r=this._requestHandler[t].call(this._requestHandler,n);if(typeof r!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);return r}if(vs(t)){const r=this._requestHandler[t];if(typeof r!="function")throw new Error(`Missing event ${t} on request handler.`);return r}throw new Error(`Malformed event name ${t}`)}initialize(t,n,r,i){this._protocol.setWorkerId(t);const l=fh(i,(o,c)=>this._protocol.sendMessage(o,c),(o,c)=>this._protocol.listen(o,c));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(l),Promise.resolve(xr(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<"u"&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),new Promise((o,c)=>{const d=globalThis.require;d([r],u=>{if(this._requestHandler=u.create(l),!this._requestHandler){c(new Error("No RequestHandler!"));return}o(xr(this._requestHandler))},c)}))}}class st{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function ys(e,t){return(t<<5)-t+e|0}function bh(e,t){t=ys(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new st(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(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),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 at{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,s,a]=at._getElements(t),[l,o,c]=at._getElements(n);this._hasStrings=a&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=o,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(at._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let u;return r<=i?(Mt.Assert(t===n+1,"originalStart should only be one more than originalEnd"),u=[new st(t,0,r,i-r+1)]):t<=n?(Mt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new st(t,n-t+1,r,0)]):(Mt.Assert(t===n+1,"originalStart should only be one more than originalEnd"),Mt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const a=[0],l=[0],o=this.ComputeRecursionPoint(t,n,r,i,a,l,s),c=a[0],d=l[0];if(o!==null)return o;if(!s[0]){const u=this.ComputeDiffRecursive(t,c,r,d,s);let f=[];return s[0]?f=[new st(c+1,n-(c+1)+1,d+1,i-(d+1)+1)]:f=this.ComputeDiffRecursive(c+1,n,d+1,i,s),this.ConcatenateChanges(u,f)}return[new st(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,a,l,o,c,d,u,f,m,w,y,E,R,N){let C=null,I=null,D=new Ss,L=n,O=r,z=m[0]-E[0]-i,q=-1073741824,K=this.m_forwardHistory.length-1;do{const _=z+t;_===L||_=0&&(c=this.m_forwardHistory[K],t=c[0],L=1,O=c.length-1)}while(--K>=-1);if(C=D.getReverseChanges(),N[0]){let _=m[0]+1,v=E[0]+1;if(C!==null&&C.length>0){const k=C[C.length-1];_=Math.max(_,k.getOriginalEnd()),v=Math.max(v,k.getModifiedEnd())}I=[new st(_,f-_+1,v,y-v+1)]}else{D=new Ss,L=a,O=l,z=m[0]-E[0]-o,q=1073741824,K=R?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const _=z+s;_===L||_=d[_+1]?(u=d[_+1]-1,w=u-z-o,u>q&&D.MarkNextChange(),q=u+1,D.AddOriginalElement(u+1,w+1),z=_+1-s):(u=d[_-1],w=u-z-o,u>q&&D.MarkNextChange(),q=u,D.AddModifiedElement(u+1,w+1),z=_-1-s),K>=0&&(d=this.m_reverseHistory[K],s=d[0],L=1,O=d.length-1)}while(--K>=-1);I=D.getChanges()}return this.ConcatenateChanges(C,I)}ComputeRecursionPoint(t,n,r,i,s,a,l){let o=0,c=0,d=0,u=0,f=0,m=0;t--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const w=n-t+(i-r),y=w+1,E=new Int32Array(y),R=new Int32Array(y),N=i-r,C=n-t,I=t-r,D=n-i,O=(C-N)%2===0;E[N]=t,R[C]=n,l[0]=!1;for(let z=1;z<=w/2+1;z++){let q=0,K=0;d=this.ClipDiagonalBound(N-z,z,N,y),u=this.ClipDiagonalBound(N+z,z,N,y);for(let v=d;v<=u;v+=2){v===d||vq+K&&(q=o,K=c),!O&&Math.abs(v-C)<=z-1&&o>=R[v])return s[0]=o,a[0]=c,k<=R[v]&&z<=1448?this.WALKTRACE(N,d,u,I,C,f,m,D,E,R,o,n,s,c,i,a,O,l):null}const _=(q-t+(K-r)-z)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(q,_))return l[0]=!0,s[0]=q,a[0]=K,_>0&&z<=1448?this.WALKTRACE(N,d,u,I,C,f,m,D,E,R,o,n,s,c,i,a,O,l):(t++,r++,[new st(t,n-t+1,r,i-r+1)]);f=this.ClipDiagonalBound(C-z,z,C,y),m=this.ClipDiagonalBound(C+z,z,C,y);for(let v=f;v<=m;v+=2){v===f||v=R[v+1]?o=R[v+1]-1:o=R[v-1],c=o-(v-C)-D;const k=o;for(;o>t&&c>r&&this.ElementsAreEqual(o,c);)o--,c--;if(R[v]=o,O&&Math.abs(v-N)<=z&&o<=E[v])return s[0]=o,a[0]=c,k>=E[v]&&z<=1448?this.WALKTRACE(N,d,u,I,C,f,m,D,E,R,o,n,s,c,i,a,O,l):null}if(z<=1447){let v=new Int32Array(u-d+2);v[0]=N-d+1,Lt.Copy2(E,d,v,1,u-d+1),this.m_forwardHistory.push(v),v=new Int32Array(m-f+2),v[0]=C-f+1,Lt.Copy2(R,f,v,1,m-f+1),this.m_reverseHistory.push(v)}}return this.WALKTRACE(N,d,u,I,C,f,m,D,E,R,o,n,s,c,i,a,O,l)}PrettifyChanges(t){for(let n=0;n0,l=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,s=0;if(n>0){const u=t[n-1];i=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const a=r.originalLength>0,l=r.modifiedLength>0;let o=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let u=1;;u++){const f=r.originalStart-u,m=r.modifiedStart-u;if(fc&&(c=y,o=u)}r.originalStart-=o,r.modifiedStart-=o;const d=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],d)){t[n-1]=d[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&m>o&&(o=m,c=u,d=f)}return o>0?[c,d]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const s=this._OriginalRegionIsBoundary(t,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(t,n){const r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return Lt.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],Lt.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return Lt.Copy(t,0,i,0,t.length),Lt.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(Mt.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Mt.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let l=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(l=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new st(i,s,a,l),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&t=xh&&e<=Ch||e>=Sh&&e<=_h}function An(e,t,n,r){let i="",s=0,a=-1,l=0,o=0;for(let c=0;c<=e.length;++c){if(c2){const d=i.lastIndexOf(n);d===-1?(i="",s=0):(i=i.slice(0,d),s=i.length-1-i.lastIndexOf(n)),a=c,l=0;continue}else if(i.length!==0){i="",s=0,a=c,l=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(a+1,c)}`:i=e.slice(a+1,c),s=c-a-1;a=c,l=0}else o===ot&&l!==-1?++l:l=-1}return i}function ks(e,t){Eh(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const we={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],oe(s,"path"),s.length===0)continue}else t.length===0?s=In():(s=wh[`=${t}`]||In(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===ye)&&(s=`${t}\\`));const a=s.length;let l=0,o="",c=!1;const d=s.charCodeAt(0);if(a===1)$(d)&&(l=1,c=!0);else if($(d))if(c=!0,$(s.charCodeAt(1))){let u=2,f=u;for(;u2&&$(s.charCodeAt(2))&&(c=!0,l=3));if(o.length>0)if(t.length>0){if(o.toLowerCase()!==t.toLowerCase())continue}else t=o;if(r){if(t.length>0)break}else if(n=`${s.slice(l)}\\${n}`,r=c,c&&t.length>0)break}return n=An(n,!r,"\\",$),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){oe(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const s=e.charCodeAt(0);if(t===1)return Nr(s)?"\\":e;if($(s))if(i=!0,$(e.charCodeAt(1))){let l=2,o=l;for(;l2&&$(e.charCodeAt(2))&&(i=!0,n=3));let a=n0&&$(e.charCodeAt(t-1))&&(a+="\\"),r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(e){oe(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return $(n)||t>2&&ht(n)&&e.charCodeAt(1)===lt&&$(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=a:t+=`\\${a}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&$(n.charCodeAt(0))){++i;const s=n.length;s>1&&$(n.charCodeAt(1))&&(++i,s>2&&($(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return we.normalize(t)},relative(e,t){if(oe(e,"from"),oe(t,"to"),e===t)return"";const n=we.resolve(e),r=we.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===ye;)s--;const a=s-i;let l=0;for(;ll&&t.charCodeAt(o-1)===ye;)o--;const c=o-l,d=ad){if(t.charCodeAt(l+f)===ye)return r.slice(l+f+1);if(f===2)return r.slice(l+f)}a>d&&(e.charCodeAt(i+f)===ye?u=f:f===2&&(u=3)),u===-1&&(u=0)}let m="";for(f=i+u+1;f<=s;++f)(f===s||e.charCodeAt(f)===ye)&&(m+=m.length===0?"..":"\\..");return l+=u,m.length>0?`${m}${r.slice(l,o)}`:(r.charCodeAt(l)===ye&&++l,r.slice(l,o))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=we.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===ye){if(t.charCodeAt(1)===ye){const n=t.charCodeAt(2);if(n!==kh&&n!==ot)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(ht(t.charCodeAt(0))&&t.charCodeAt(1)===lt&&t.charCodeAt(2)===ye)return`\\\\?\\${t}`;return e},dirname(e){oe(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return $(i)?e:".";if($(i)){if(n=r=1,$(e.charCodeAt(1))){let l=2,o=l;for(;l2&&$(e.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let l=t-1;l>=r;--l)if($(e.charCodeAt(l))){if(!a){s=l;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&oe(t,"ext"),oe(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&ht(e.charCodeAt(0))&&e.charCodeAt(1)===lt&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(s=e.length-1;s>=n;--s){const o=e.charCodeAt(s);if($(o)){if(!i){n=s+1;break}}else l===-1&&(i=!1,l=s+1),a>=0&&(o===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if($(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){oe(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===lt&&ht(e.charCodeAt(0))&&(t=r=2);for(let l=e.length-1;l>=t;--l){const o=e.charCodeAt(l);if($(o)){if(!s){r=l+1;break}continue}i===-1&&(s=!1,i=l+1),o===ot?n===-1?n=l:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:ks.bind(null,"\\"),parse(e){oe(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return $(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if($(i)){if(r=1,$(e.charCodeAt(1))){let u=2,f=u;for(;u0&&(t.root=e.slice(0,r));let s=-1,a=r,l=-1,o=!0,c=e.length-1,d=0;for(;c>=r;--c){if(i=e.charCodeAt(c),$(i)){if(!o){a=c+1;break}continue}l===-1&&(o=!1,l=c+1),i===ot?s===-1?s=c:d!==1&&(d=1):s!==-1&&(d=-1)}return l!==-1&&(s===-1||d===0||d===1&&s===l-1&&s===a+1?t.base=t.name=e.slice(a,l):(t.name=e.slice(a,s),t.base=e.slice(a,l),t.ext=e.slice(s,l))),a>0&&a!==r?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Fh=(()=>{if(ct){const e=/\\/g;return()=>{const t=In().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>In()})(),xe={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:Fh();oe(i,"path"),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===me)}return t=An(t,!n,"/",Nr),n?`/${t}`:t.length>0?t:"."},normalize(e){if(oe(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===me,n=e.charCodeAt(e.length-1)===me;return e=An(e,!t,"/",Nr),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return oe(e,"path"),e.length>0&&e.charCodeAt(0)===me},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":xe.normalize(t)},relative(e,t){if(oe(e,"from"),oe(t,"to"),e===t||(e=xe.resolve(e),t=xe.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,s=1,a=t.length-s,l=il){if(t.charCodeAt(s+c)===me)return t.slice(s+c+1);if(c===0)return t.slice(s+c)}else i>l&&(e.charCodeAt(n+c)===me?o=c:c===0&&(o=0));let d="";for(c=n+o+1;c<=r;++c)(c===r||e.charCodeAt(c)===me)&&(d+=d.length===0?"..":"/..");return`${d}${t.slice(s+o)}`},toNamespacedPath(e){return e},dirname(e){if(oe(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===me;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===me){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&oe(t,"ext"),oe(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(s=e.length-1;s>=0;--s){const o=e.charCodeAt(s);if(o===me){if(!i){n=s+1;break}}else l===-1&&(i=!1,l=s+1),a>=0&&(o===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===me){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){oe(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const l=e.charCodeAt(a);if(l===me){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),l===ot?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:ks.bind(null,"/"),parse(e){oe(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===me;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,a=-1,l=!0,o=e.length-1,c=0;for(;o>=r;--o){const d=e.charCodeAt(o);if(d===me){if(!l){s=o+1;break}continue}a===-1&&(l=!1,a=o+1),d===ot?i===-1?i=o:c!==1&&(c=1):i!==-1&&(c=-1)}if(a!==-1){const d=s===0&&n?1:s;i===-1||c===0||c===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(d,a):(t.name=e.slice(d,i),t.base=e.slice(d,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};xe.win32=we.win32=we,xe.posix=we.posix=xe,ct?we.normalize:xe.normalize,ct?we.resolve:xe.resolve,ct?we.relative:xe.relative,ct?we.dirname:xe.dirname,ct?we.basename:xe.basename,ct?we.extname:xe.extname,ct?we.sep:xe.sep;const Rh=/^\w[\w\d+.-]*$/,Dh=/^\//,Nh=/^\/\//;function Ih(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Rh.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Dh.test(e.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(Nh.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Ah(e,t){return!e&&!t?"file":e}function Mh(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Le&&(t=Le+t):t=Le;break}return t}const te="",Le="/",Lh=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Ir=class fr{static isUri(t){return t instanceof fr?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||te,this.authority=t.authority||te,this.path=t.path||te,this.query=t.query||te,this.fragment=t.fragment||te):(this.scheme=Ah(t,a),this.authority=n||te,this.path=Mh(this.scheme,r||te),this.query=i||te,this.fragment=s||te,Ih(this,a))}get fsPath(){return Ar(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=t;return n===void 0?n=this.scheme:n===null&&(n=te),r===void 0?r=this.authority:r===null&&(r=te),i===void 0?i=this.path:i===null&&(i=te),s===void 0?s=this.query:s===null&&(s=te),a===void 0?a=this.fragment:a===null&&(a=te),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Pt(n,r,i,s,a)}static parse(t,n=!1){const r=Lh.exec(t);return r?new Pt(r[2]||te,Mn(r[4]||te),Mn(r[5]||te),Mn(r[7]||te),Mn(r[9]||te),n):new Pt(te,te,te,te,te)}static file(t){let n=te;if(en&&(t=t.replace(/\\/g,Le)),t[0]===Le&&t[1]===Le){const r=t.indexOf(Le,2);r===-1?(n=t.substring(2),t=Le):(n=t.substring(2,r),t=t.substring(r)||Le)}return new Pt("file",n,t,te,te)}static from(t,n){return new Pt(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return en&&t.scheme==="file"?r=fr.file(we.join(Ar(t,!0),...n)).path:r=xe.join(t.path,...n),t.with({path:r})}toString(t=!1){return Mr(this,t)}toJSON(){return this}static revive(t){var n,r;if(t){if(t instanceof fr)return t;{const i=new Pt(t);return i._formatted=(n=t.external)!==null&&n!==void 0?n:null,i._fsPath=t._sep===Es&&(r=t.fsPath)!==null&&r!==void 0?r:null,i}}else return t}};const Es=en?1:void 0;class Pt extends Ir{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Ar(this,!1)),this._fsPath}toString(t=!1){return t?Mr(this,!0):(this._formatted||(this._formatted=Mr(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Es),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const Fs={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 Rs(e,t,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));const l=Fs[a];l!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=l):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function zh(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,en&&(n=n.replace(/\//g,"\\")),n}function Mr(e,t){const n=t?zh:Rs;let r="",{scheme:i,authority:s,path:a,query:l,fragment:o}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=Le,r+=Le),s){let c=s.indexOf("@");if(c!==-1){const d=s.substr(0,c);s=s.substr(c+1),c=d.lastIndexOf(":"),c===-1?r+=n(d,!1,!1):(r+=n(d.substr(0,c),!1,!1),r+=":",r+=n(d.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const c=a.charCodeAt(1);c>=65&&c<=90&&(a=`/${String.fromCharCode(c+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const c=a.charCodeAt(0);c>=65&&c<=90&&(a=`${String.fromCharCode(c+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return l&&(r+="?",r+=n(l,!1,!1)),o&&(r+="#",r+=t?o:Rs(o,!1,!1)),r}function Ds(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Ds(e.substr(3)):e}}const Ns=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Mn(e){return e.match(Ns)?e.replace(Ns,t=>Ds(t)):e}let We=class Ft{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new Ft(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return Ft.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return Ft.isBefore(this,t)}static isBefore(t,n){return t.lineNumberr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return ce.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return ce.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return ce.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return ce.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return ce.plusRange(this,t)}static plusRange(t,n){let r,i,s,a;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new ce(r,i,s,a)}intersectRanges(t){return ce.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn;const l=n.startLineNumber,o=n.startColumn,c=n.endLineNumber,d=n.endColumn;return rc?(s=c,a=d):s===c&&(a=Math.min(a,d)),r>s||r===s&&i>a?null:new ce(r,i,s,a)}equalsRange(t){return ce.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return ce.getEndPosition(this)}static getEndPosition(t){return new We(t.endLineNumber,t.endColumn)}getStartPosition(){return ce.getStartPosition(this)}static getStartPosition(t){return new We(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new ce(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new ce(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return ce.collapseToStart(this)}static collapseToStart(t){return new ce(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return ce.collapseToEnd(this)}static collapseToEnd(t){return new ce(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new ce(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new ce(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new ce(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function Ph(e,t,n=(r,i)=>r===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Is||(Is={}));function Ln(e,t){return(n,r)=>t(e(n),e(r))}const zn=(e,t)=>e-t;function Uh(e){return(t,n)=>-e(t,n)}function As(e){return e<0?0:e>255?255:e|0}function Tt(e){return e<0?0:e>4294967295?4294967295:e|0}class $h{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Tt(t);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,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=Tt(t),n=Tt(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;const s=r.length-t;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-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(t){return t<0?0:(t=Tt(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),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],t=s)n=i+1;else break;return new Bh(i,t-a)}}class Bh{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class qh{constructor(t,n,r,i){this._uri=t,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(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new We(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function Hh(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of jh)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const Ms=Hh();function Ls(e){let t=Ms;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const zs=new Lc;zs.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Lr(e,t,n,r,i){if(t=Ls(t),i||(i=Fn.first(zs)),n.length>i.maxLen){let c=e-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,e+i.maxLen/2),Lr(e,t,n,r,i)}const s=Date.now(),a=e-1-r;let l=-1,o=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){const d=a-i.windowSize*c;t.lastIndex=Math.max(0,d);const u=Gh(t,n,a,l);if(!u&&o||(o=u,d<=0))break;l=d}if(o){const c={word:o[0],startColumn:r+1+o.index,endColumn:r+1+o.index+o[0].length};return t.lastIndex=0,c}return null}function Gh(e,t,n,r){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class zr{constructor(t){const n=As(t);this._defaultValue=n,this._asciiMap=zr._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=As(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Jh{constructor(t,n,r){const i=new Uint8Array(t*n);for(let s=0,a=t*n;sn&&(n=o),l>r&&(r=l),c>r&&(r=c)}n++,r++;const i=new Jh(r,n,0);for(let s=0,a=t.length;s=this._maxCharCode?0:this._states.get(t,n)}}let Pr=null;function Yh(){return Pr===null&&(Pr=new Xh([[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]])),Pr}let tn=null;function Qh(){if(tn===null){tn=new zr(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let n=0;ni);if(i>0){const l=n.charCodeAt(i-1),o=n.charCodeAt(a);(l===40&&o===41||l===91&&o===93||l===123&&o===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(t,n=Yh()){const r=Qh(),i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const l=t.getLineContent(s),o=l.length;let c=0,d=0,u=0,f=1,m=!1,w=!1,y=!1,E=!1;for(;c=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}Tr.INSTANCE=new Tr;const Ps=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Tn;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof On?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:vr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ps})})(Tn||(Tn={}));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?Ps:(this._emitter||(this._emitter=new Ae),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Zh{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.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=Tn.Cancelled}dispose(t=!1){var n;t&&this.cancel(),(n=this._parentListener)===null||n===void 0||n.dispose(),this._token?this._token instanceof On&&this._token.dispose():this._token=Tn.None}}class Or{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const Wn=new Or,Wr=new Or,Vr=new Or,ed=new Array(230),td=Object.create(null),nd=Object.create(null);(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],r=[];for(const i of t){const[s,a,l,o,c,d,u,f,m]=i;if(r[a]||(r[a]=!0,td[l]=a,nd[l.toLowerCase()]=a),!n[o]){if(n[o]=!0,!c)throw new Error(`String representation missing for key code ${o} around scan code ${l}`);Wn.define(o,c),Wr.define(o,f||c),Vr.define(o,m||f||c)}d&&(ed[d]=o)}})();var Ts;(function(e){function t(l){return Wn.keyCodeToStr(l)}e.toString=t;function n(l){return Wn.strToKeyCode(l)}e.fromString=n;function r(l){return Wr.keyCodeToStr(l)}e.toUserSettingsUS=r;function i(l){return Vr.keyCodeToStr(l)}e.toUserSettingsGeneral=i;function s(l){return Wr.strToKeyCode(l)||Vr.strToKeyCode(l)}e.fromUserSettings=s;function a(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Wn.keyCodeToStr(l)}e.toElectronAccelerator=a})(Ts||(Ts={}));function rd(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class Se extends se{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return Se.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new Se(this.startLineNumber,this.startColumn,t,n):new Se(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new We(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new We(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new Se(t,n,this.endLineNumber,this.endColumn):new Se(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new Se(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new Se(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new Se(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new Se(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){var r;(r=this._factories.get(t))===null||r===void 0||r.dispose();const i=new od(this,t,n);return this._factories.set(t,i),Rn(()=>{const s=this._factories.get(t);!s||s!==i||(this._factories.delete(t),s.dispose())})}async getOrCreate(t){const n=this.get(t);if(n)return n;const r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;const r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class od extends Zt{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}}class ld{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var Ws;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Ws||(Ws={}));var Vs;(function(e){const t=new Map;t.set(0,W.symbolMethod),t.set(1,W.symbolFunction),t.set(2,W.symbolConstructor),t.set(3,W.symbolField),t.set(4,W.symbolVariable),t.set(5,W.symbolClass),t.set(6,W.symbolStruct),t.set(7,W.symbolInterface),t.set(8,W.symbolModule),t.set(9,W.symbolProperty),t.set(10,W.symbolEvent),t.set(11,W.symbolOperator),t.set(12,W.symbolUnit),t.set(13,W.symbolValue),t.set(15,W.symbolEnum),t.set(14,W.symbolConstant),t.set(15,W.symbolEnum),t.set(16,W.symbolEnumMember),t.set(17,W.symbolKeyword),t.set(27,W.symbolSnippet),t.set(18,W.symbolText),t.set(19,W.symbolColor),t.set(20,W.symbolFile),t.set(21,W.symbolReference),t.set(22,W.symbolCustomColor),t.set(23,W.symbolFolder),t.set(24,W.symbolTypeParameter),t.set(25,W.account),t.set(26,W.issues);function n(s){let a=t.get(s);return a||(console.info("No codicon found for CompletionItemKind "+s),a=W.symbolProperty),a}e.toIcon=n;const r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,a){let l=r.get(s);return typeof l>"u"&&!a&&(l=9),l}e.fromString=i})(Vs||(Vs={}));var Us;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Us||(Us={}));var $s;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})($s||($s={}));var Bs;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Bs||(Bs={}));var qs;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(qs||(qs={})),ee("Array","array"),ee("Boolean","boolean"),ee("Class","class"),ee("Constant","constant"),ee("Constructor","constructor"),ee("Enum","enumeration"),ee("EnumMember","enumeration member"),ee("Event","event"),ee("Field","field"),ee("File","file"),ee("Function","function"),ee("Interface","interface"),ee("Key","key"),ee("Method","method"),ee("Module","module"),ee("Namespace","namespace"),ee("Null","null"),ee("Number","number"),ee("Object","object"),ee("Operator","operator"),ee("Package","package"),ee("Property","property"),ee("String","string"),ee("Struct","struct"),ee("TypeParameter","type parameter"),ee("Variable","variable");var js;(function(e){const t=new Map;t.set(0,W.symbolFile),t.set(1,W.symbolModule),t.set(2,W.symbolNamespace),t.set(3,W.symbolPackage),t.set(4,W.symbolClass),t.set(5,W.symbolMethod),t.set(6,W.symbolProperty),t.set(7,W.symbolField),t.set(8,W.symbolConstructor),t.set(9,W.symbolEnum),t.set(10,W.symbolInterface),t.set(11,W.symbolFunction),t.set(12,W.symbolVariable),t.set(13,W.symbolConstant),t.set(14,W.symbolString),t.set(15,W.symbolNumber),t.set(16,W.symbolBoolean),t.set(17,W.symbolArray),t.set(18,W.symbolObject),t.set(19,W.symbolKey),t.set(20,W.symbolNull),t.set(21,W.symbolEnumMember),t.set(22,W.symbolStruct),t.set(23,W.symbolEvent),t.set(24,W.symbolOperator),t.set(25,W.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=W.symbolProperty),i}e.toIcon=n})(js||(js={}));var Hs;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Hs||(Hs={}));var Gs;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Gs||(Gs={}));var Js;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(Js||(Js={}));var Xs;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Xs||(Xs={})),new ad;var Ys;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Ys||(Ys={}));var Qs;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(Qs||(Qs={}));var Ks;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(Ks||(Ks={}));var Zs;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Zs||(Zs={}));var ea;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(ea||(ea={}));var ta;(function(e){e[e.Deprecated=1]="Deprecated"})(ta||(ta={}));var na;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(na||(na={}));var ra;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(ra||(ra={}));var ia;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(ia||(ia={}));var sa;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(sa||(sa={}));var aa;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(aa||(aa={}));var oa;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(oa||(oa={}));var la;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=88]="definitionLinkOpensInPeek",e[e.quickSuggestions=89]="quickSuggestions",e[e.quickSuggestionsDelay=90]="quickSuggestionsDelay",e[e.readOnly=91]="readOnly",e[e.readOnlyMessage=92]="readOnlyMessage",e[e.renameOnType=93]="renameOnType",e[e.renderControlCharacters=94]="renderControlCharacters",e[e.renderFinalNewline=95]="renderFinalNewline",e[e.renderLineHighlight=96]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=97]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=98]="renderValidationDecorations",e[e.renderWhitespace=99]="renderWhitespace",e[e.revealHorizontalRightPadding=100]="revealHorizontalRightPadding",e[e.roundedSelection=101]="roundedSelection",e[e.rulers=102]="rulers",e[e.scrollbar=103]="scrollbar",e[e.scrollBeyondLastColumn=104]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=105]="scrollBeyondLastLine",e[e.scrollPredominantAxis=106]="scrollPredominantAxis",e[e.selectionClipboard=107]="selectionClipboard",e[e.selectionHighlight=108]="selectionHighlight",e[e.selectOnLineNumbers=109]="selectOnLineNumbers",e[e.showFoldingControls=110]="showFoldingControls",e[e.showUnused=111]="showUnused",e[e.snippetSuggestions=112]="snippetSuggestions",e[e.smartSelect=113]="smartSelect",e[e.smoothScrolling=114]="smoothScrolling",e[e.stickyScroll=115]="stickyScroll",e[e.stickyTabStops=116]="stickyTabStops",e[e.stopRenderingLineAfter=117]="stopRenderingLineAfter",e[e.suggest=118]="suggest",e[e.suggestFontSize=119]="suggestFontSize",e[e.suggestLineHeight=120]="suggestLineHeight",e[e.suggestOnTriggerCharacters=121]="suggestOnTriggerCharacters",e[e.suggestSelection=122]="suggestSelection",e[e.tabCompletion=123]="tabCompletion",e[e.tabIndex=124]="tabIndex",e[e.unicodeHighlighting=125]="unicodeHighlighting",e[e.unusualLineTerminators=126]="unusualLineTerminators",e[e.useShadowDOM=127]="useShadowDOM",e[e.useTabStops=128]="useTabStops",e[e.wordBreak=129]="wordBreak",e[e.wordSegmenterLocales=130]="wordSegmenterLocales",e[e.wordSeparators=131]="wordSeparators",e[e.wordWrap=132]="wordWrap",e[e.wordWrapBreakAfterCharacters=133]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=134]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=135]="wordWrapColumn",e[e.wordWrapOverride1=136]="wordWrapOverride1",e[e.wordWrapOverride2=137]="wordWrapOverride2",e[e.wrappingIndent=138]="wrappingIndent",e[e.wrappingStrategy=139]="wrappingStrategy",e[e.showDeprecated=140]="showDeprecated",e[e.inlayHints=141]="inlayHints",e[e.editorClassName=142]="editorClassName",e[e.pixelRatio=143]="pixelRatio",e[e.tabFocusMode=144]="tabFocusMode",e[e.layoutInfo=145]="layoutInfo",e[e.wrappingInfo=146]="wrappingInfo",e[e.defaultColorDecorators=147]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=148]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=149]="inlineCompletionsAccessibilityVerbose"})(la||(la={}));var ca;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(ca||(ca={}));var ha;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(ha||(ha={}));var da;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(da||(da={}));var ua;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(ua||(ua={}));var pa;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(pa||(pa={}));var ma;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(ma||(ma={}));var fa;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(fa||(fa={}));var ga;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(ga||(ga={}));var ba;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(ba||(ba={}));var Ur;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(Ur||(Ur={}));var $r;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})($r||($r={}));var Br;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(Br||(Br={}));var va;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(va||(va={}));var wa;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(wa||(wa={}));var ya;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(ya||(ya={}));var xa;(function(e){e[e.AIGenerated=1]="AIGenerated"})(xa||(xa={}));var Sa;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Sa||(Sa={}));var Ca;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(Ca||(Ca={}));var _a;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(_a||(_a={}));var ka;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(ka||(ka={}));var Ea;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(Ea||(Ea={}));var Fa;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(Fa||(Fa={}));var Ra;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Ra||(Ra={}));var Da;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Da||(Da={}));var Na;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Na||(Na={}));var qr;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(qr||(qr={}));var Ia;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(Ia||(Ia={}));var Aa;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Aa||(Aa={}));var Ma;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(Ma||(Ma={}));var La;(function(e){e[e.Deprecated=1]="Deprecated"})(La||(La={}));var za;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(za||(za={}));var Pa;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(Pa||(Pa={}));var Ta;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Ta||(Ta={}));var Oa;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Oa||(Oa={}));class nn{static chord(t,n){return rd(t,n)}}nn.CtrlCmd=2048,nn.Shift=1024,nn.Alt=512,nn.WinCtrl=256;function cd(){return{editor:void 0,languages:void 0,CancellationTokenSource:Zh,Emitter:Ae,KeyCode:Ur,KeyMod:nn,Position:We,Range:se,Selection:Se,SelectionDirection:qr,MarkerSeverity:$r,MarkerTag:Br,Uri:Ir,Token:ld}}var Wa;class hd{constructor(){this[Wa]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var t;return(t=this._head)===null||t===void 0?void 0:t.value}get last(){var t;return(t=this._tail)===null||t===void 0?void 0:t.value}has(t){return this._map.has(t)}get(t,n=0){const r=this._map.get(t);if(r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let i=this._map.get(t);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){const r=this._state;let i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(Wa=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;const r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;const r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){const t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(const[n,r]of t)this.set(n,r)}}class dd extends hd{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,n=2){return super.get(t,n)}peek(t){return super.get(t,0)}set(t,n){return super.set(t,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class ud extends dd{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}}class pd{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){const r=this.map.get(t);r&&(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){const r=this.map.get(t);r&&r.forEach(n)}get(t){const n=this.map.get(t);return n||new Set}}new ud(10);var Va;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Va||(Va={}));var Ua;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Ua||(Ua={}));var $a;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})($a||($a={}));function md(e,t,n,r,i){if(r===0)return!0;const s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r);if(e.get(a)!==0)return!0}return!1}function fd(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r+i-1);if(e.get(a)!==0)return!0}return!1}function gd(e,t,n,r,i){return md(e,t,n,r,i)&&fd(e,t,n,r,i)}class bd{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){const n=t.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){ah(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||gd(this._wordSeparators,t,n,i,s))return r}while(r);return null}}function vd(e,t="Unreachable"){throw new Error(t)}function Vn(e){if(!e()){debugger;e(),Ge(new Te("Assertion Failed"))}}function Ba(e,t){let n=0;for(;n0){const q=N.charCodeAt(I-1);Rr(q)&&I--}if(D+1=1e3){u=!0;break e}d.push(new se(E,I+1,E,D+1))}}while(f)}return{ranges:d,hasMore:u,ambiguousCharacterCount:m,invisibleCharacterCount:w,nonBasicAsciiCharacterCount:y}}static computeUnicodeHighlightReason(t,n){const r=new qa(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=t.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),l=yt.getLocales().filter(o=>!yt.getInstance(new Set([...n.allowedLocales,o])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:l}}case 1:return{kind:2}}}}function yd(e,t){return`[${eh(e.map(r=>String.fromCodePoint(r)).join(""))}]`}class qa{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=yt.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const n of it.codePoints)ja(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(const n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){const r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const l=a.codePointAt(0),o=lh(a);i=i||o,!o&&!this.ambiguousCharacters.isAmbiguous(l)&&!it.isInvisibleCharacter(l)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!ja(t)&&it.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function ja(e){return e===" "||e===` `||e===" "}class Un{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}}class xd{constructor(t,n){this.lineRangeMapping=t,this.changes=n}}class j{static addRange(t,n){let r=0;for(;rn))return new j(t,n)}static ofLength(t){return new j(0,t)}static ofStartAndLength(t,n){return new j(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new Te(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new j(this.start+t,this.endExclusive+t)}deltaStart(t){return new j(this.start+t,this.endExclusive)}deltaEnd(t){return new j(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new Te(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new Te(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new Te(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=rn(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){const n=Ot(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=Ot(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=a.startLineNumber?s=new B(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new Ve(n)}subtractFrom(t){const n=jr(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),r=rn(this._normalizedRanges,a=>a.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new Ve([t]);const i=[];let s=t.startLineNumber;for(let a=n;as&&i.push(new B(s,l.startLineNumber)),s=l.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){const n=[];let r=0,i=0;for(;rn.delta(t)))}}class Cd{constructor(t,n){this.range=t,this.text=n}}class ze{static inverse(t,n,r){const i=[];let s=1,a=1;for(const o of t){const c=new ze(new B(s,o.original.startLineNumber),new B(a,o.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=o.original.endLineNumberExclusive,a=o.modified.endLineNumberExclusive}const l=new ze(new B(s,n+1),new B(a,r+1));return l.modified.isEmpty||i.push(l),i}static clip(t,n,r){const i=[];for(const s of t){const a=s.original.intersect(n),l=s.modified.intersect(r);a&&!a.isEmpty&&l&&!l.isEmpty&&i.push(new ze(a,l))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ze(this.modified,this.original)}join(t){return new ze(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){const t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new dt(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Te("not a valid diff");return new dt(new se(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new se(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new dt(new se(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new se(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}}class Je extends ze{static fromRangeMappings(t){const n=B.join(t.map(i=>B.fromRangeInclusive(i.originalRange))),r=B.join(t.map(i=>B.fromRangeInclusive(i.modifiedRange)));return new Je(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){var t;return new Je(this.modified,this.original,(t=this.innerChanges)===null||t===void 0?void 0:t.map(n=>n.flip()))}withInnerChangesFromLineRanges(){return new Je(this.original,this.modified,[this.toRangeMapping()])}}class dt{constructor(t,n){this.originalRange=t,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new dt(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new Cd(this.originalRange,n)}}const _d=3;class kd{computeDiff(t,n,r){var i;const a=new Rd(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),l=[];let o=null;for(const c of a.changes){let d;c.originalEndLineNumber===0?d=new B(c.originalStartLineNumber+1,c.originalStartLineNumber+1):d=new B(c.originalStartLineNumber,c.originalEndLineNumber+1);let u;c.modifiedEndLineNumber===0?u=new B(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):u=new B(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let f=new Je(d,u,(i=c.charChanges)===null||i===void 0?void 0:i.map(m=>new dt(new se(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new se(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===f.modified.startLineNumber||o.original.endLineNumberExclusive===f.original.startLineNumber)&&(f=new Je(o.original.join(f.original),o.modified.join(f.modified),o.innerChanges&&f.innerChanges?o.innerChanges.concat(f.innerChanges):void 0),l.pop()),l.push(f),o=f}return Vn(()=>Ba(l,(c,d)=>d.original.startLineNumber-c.original.endLineNumberExclusive===d.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}}class Wt{constructor(t,n,r,i,s,a,l,o){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=l,this.modifiedEndColumn=o}static createFromDiffChange(t,n,r){const i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),a=n.getEndLineNumber(t.originalStart+t.originalLength-1),l=n.getEndColumn(t.originalStart+t.originalLength-1),o=r.getStartLineNumber(t.modifiedStart),c=r.getStartColumn(t.modifiedStart),d=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),u=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new Wt(i,s,a,l,o,c,d,u)}}function Fd(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const m=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),w=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&w.getElements().length>0){let y=Ha(m,w,s,!0).changes;l&&(y=Fd(y)),f=[];for(let E=0,R=y.length;E1&&y>1;){const E=f.charCodeAt(w-2),R=m.charCodeAt(y-2);if(E!==R)break;w--,y--}(w>1||y>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,w,a+1,1,y)}{let w=Gr(f,1),y=Gr(m,1);const E=f.length+1,R=m.length+1;for(;w!0;const t=Date.now();return()=>Date.now()-t{r.push(ae.fromOffsetPairs(i?i.getEndExclusives():Ce.zero,s?s.getStarts():new Ce(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new ae(new j(t.offset1,n.offset1),new j(t.offset2,n.offset2))}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new ae(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new ae(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new ae(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new ae(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new ae(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){const n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new ae(n,r)}getStarts(){return new Ce(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Ce(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Ce{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new Ce(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}}Ce.zero=new Ce(0,0),Ce.max=new Ce(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class on{isValid(){return!0}}on.instance=new on;class Dd{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new Te("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&y>0&&a.get(w-1,y-1)===3&&(N+=l.get(w-1,y-1)),N+=i?i(w,y):1):N=-1;const C=Math.max(E,R,N);if(C===N){const I=w>0&&y>0?l.get(w-1,y-1):0;l.set(w,y,I+1),a.set(w,y,3)}else C===E?(l.set(w,y,0),a.set(w,y,1)):C===R&&(l.set(w,y,0),a.set(w,y,2));s.set(w,y,C)}const o=[];let c=t.length,d=n.length;function u(w,y){(w+1!==c||y+1!==d)&&o.push(new ae(new j(w+1,c),new j(y+1,d))),c=w,d=y}let f=t.length-1,m=n.length-1;for(;f>=0&&m>=0;)a.get(f,m)===3?(u(f,m),f--,m--):a.get(f,m)===1?f--:m--;return u(-1,-1),o.reverse(),new Xe(o,!1)}}class Xa{compute(t,n,r=on.instance){if(t.length===0||n.length===0)return Xe.trivial(t,n);const i=t,s=n;function a(y,E){for(;yi.length||I>s.length)continue;const D=a(C,I);o.set(d,D);const L=C===R?c.get(d+1):c.get(d-1);if(c.set(d,D!==C?new Ya(L,C,I,D-C):L),o.get(d)===i.length&&o.get(d)-d===s.length)break e}}let u=c.get(d);const f=[];let m=i.length,w=s.length;for(;;){const y=u?u.x+u.length:0,E=u?u.y+u.length:0;if((y!==m||E!==w)&&f.push(new ae(new j(y,m),new j(E,w))),!u)break;m=u.x,w=u.y,u=u.prev}return f.reverse(),new Xe(f,!1)}}class Ya{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}}class Id{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}}class Ad{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}}class $n{constructor(t,n,r){this.lines=t,this.considerWhitespaceChanges=r,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let i=!1;n.start>0&&n.endExclusive>=t.length&&(n=new j(n.start-1,n.endExclusive),i=!0),this.lineRange=n,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){const n=Ka(t>0?this.elements[t-1]:-1),r=Ka(tr<=t);return new We(this.lineRange.start+n+1,t-this.firstCharOffsetByLine[n]+this.additionalOffsetByLine[n]+1)}translateRange(t){return se.fromPositions(this.translateOffset(t.start),this.translateOffset(t.endExclusive))}findWordContaining(t){if(t<0||t>=this.elements.length||!Yr(this.elements[t]))return;let n=t;for(;n>0&&Yr(this.elements[n-1]);)n--;let r=t;for(;ra<=t.start))!==null&&n!==void 0?n:0,s=(r=Sd(this.firstCharOffsetByLine,a=>t.endExclusive<=a))!==null&&r!==void 0?r:this.elements.length;return new j(i,s)}}function Yr(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const Md={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Qa(e){return Md[e]}function Ka(e){return e===10?8:e===13?7:Xr(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Ld(e,t,n,r,i,s){let{moves:a,excludedChanges:l}=Pd(e,t,n,s);if(!s.isValid())return[];const o=e.filter(d=>!l.has(d)),c=Td(o,r,i,t,n,s);return Vh(a,c),a=Od(a),a=a.filter(d=>{const u=d.original.toOffsetRange().slice(t).map(m=>m.trim());return u.join(` `).length>=15&&zd(u,m=>m.length>=2)>=2}),a=Wd(e,a),a}function zd(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function Pd(e,t,n,r){const i=[],s=e.filter(o=>o.modified.isEmpty&&o.original.length>=3).map(o=>new Vt(o.original,t,o)),a=new Set(e.filter(o=>o.original.isEmpty&&o.modified.length>=3).map(o=>new Vt(o.modified,n,o))),l=new Set;for(const o of s){let c=-1,d;for(const u of a){const f=o.computeSimilarity(u);f>c&&(c=f,d=u)}if(c>.9&&d&&(a.delete(d),i.push(new ze(o.range,d.range)),l.add(o.source),l.add(d.source)),!r.isValid())return{moves:i,excludedChanges:l}}return{moves:i,excludedChanges:l}}function Td(e,t,n,r,i,s){const a=[],l=new pd;for(const f of e)for(let m=f.original.startLineNumber;mf.modified.startLineNumber,zn));for(const f of e){let m=[];for(let w=f.modified.startLineNumber;w{for(const I of m)if(I.originalLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive&&I.modifiedLineRange.endLineNumberExclusive+1===E.endLineNumberExclusive){I.originalLineRange=new B(I.originalLineRange.startLineNumber,N.endLineNumberExclusive),I.modifiedLineRange=new B(I.modifiedLineRange.startLineNumber,E.endLineNumberExclusive),R.push(I);return}const C={modifiedLineRange:E,originalLineRange:N};o.push(C),R.push(C)}),m=R}if(!s.isValid())return[]}o.sort(Uh(Ln(f=>f.modifiedLineRange.length,zn)));const c=new Ve,d=new Ve;for(const f of o){const m=f.modifiedLineRange.startLineNumber-f.originalLineRange.startLineNumber,w=c.subtractFrom(f.modifiedLineRange),y=d.subtractFrom(f.originalLineRange).getWithDelta(m),E=w.getIntersection(y);for(const R of E.ranges){if(R.length<3)continue;const N=R,C=R.delta(-m);a.push(new ze(C,N)),c.addRange(N),d.addRange(C)}}a.sort(Ln(f=>f.original.startLineNumber,zn));const u=new sn(e);for(let f=0;fL.original.startLineNumber<=m.original.startLineNumber),y=Ot(e,L=>L.modified.startLineNumber<=m.modified.startLineNumber),E=Math.max(m.original.startLineNumber-w.original.startLineNumber,m.modified.startLineNumber-y.modified.startLineNumber),R=u.findLastMonotonous(L=>L.original.startLineNumberL.modified.startLineNumberr.length||O>i.length||c.contains(O)||d.contains(L)||!Za(r[L-1],i[O-1],s))break}I>0&&(d.addRange(new B(m.original.startLineNumber-I,m.original.startLineNumber)),c.addRange(new B(m.modified.startLineNumber-I,m.modified.startLineNumber)));let D;for(D=0;Dr.length||O>i.length||c.contains(O)||d.contains(L)||!Za(r[L-1],i[O-1],s))break}D>0&&(d.addRange(new B(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+D)),c.addRange(new B(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+D))),(I>0||D>0)&&(a[f]=new ze(new B(m.original.startLineNumber-I,m.original.endLineNumberExclusive+D),new B(m.modified.startLineNumber-I,m.modified.endLineNumberExclusive+D)))}return a}function Za(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new Xa().compute(new $n([e],new j(0,1),!1),new $n([t],new j(0,1),!1),n);let s=0;const a=ae.invert(i.diffs,e.length);for(const d of a)d.seq1Range.forEach(u=>{Xr(e.charCodeAt(u))||s++});function l(d){let u=0;for(let f=0;ft.length?e:t);return s/o>.6&&o>10}function Od(e){if(e.length===0)return e;e.sort(Ln(n=>n.original.startLineNumber,zn));const t=[e[0]];for(let n=1;n=0&&a>=0&&s+a<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function Wd(e,t){const n=new sn(e);return t=t.filter(r=>{const i=n.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber0&&(l=l.delta(c))}i.push(l)}return r.length>0&&i.push(r[r.length-1]),i}function Vd(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&e.seq2Range.start-a>=i.start&&n.isStronglyEqual(e.seq2Range.start-a,e.seq2Range.endExclusive-a)&&a<100;)a++;a--;let l=0;for(;e.seq1Range.start+lc&&(c=w,o=d)}return e.delta(o)}function Ud(e,t,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new ae(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function $d(e,t,n){const r=ae.invert(n,e.length),i=[];let s=new Ce(0,0);function a(o,c){if(o.offset10;){const E=r[0];if(!(E.seq1Range.intersects(f.seq1Range)||E.seq2Range.intersects(f.seq2Range)))break;const N=e.findWordContaining(E.seq1Range.start),C=t.findWordContaining(E.seq2Range.start),I=new ae(N,C),D=I.intersect(E);if(w+=D.seq1Range.length,y+=D.seq2Range.length,f=f.join(I),f.seq1Range.endExclusive>=E.seq1Range.endExclusive)r.shift();else break}w+y<(f.seq1Range.length+f.seq2Range.length)*2/3&&i.push(f),s=f.getEndExclusives()}for(;r.length>0;){const o=r.shift();o.seq1Range.isEmpty||(a(o.getStarts(),o),a(o.getEndExclusives().delta(-1),o))}return Bd(n,i)}function Bd(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function qd(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let l=1;l5||m.seq1Range.length+m.seq2Range.length>5)};const o=r[l],c=a[a.length-1];d(c,o)?(s=!0,a[a.length-1]=a[a.length-1].join(o)):a.push(o)}r=a}while(i++<10&&s);return r}function jd(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const l=[r[0]];for(let o=1;o5||y.length>500)return!1;const R=e.getText(y).trim();if(R.length>20||R.split(/\r\n|\r|\n/).length>1)return!1;const N=e.countLinesIn(m.seq1Range),C=m.seq1Range.length,I=t.countLinesIn(m.seq2Range),D=m.seq2Range.length,L=e.countLinesIn(w.seq1Range),O=w.seq1Range.length,z=t.countLinesIn(w.seq2Range),q=w.seq2Range.length,K=2*40+50;function _(v){return Math.min(v,K)}return Math.pow(Math.pow(_(N*40+C),1.5)+Math.pow(_(I*40+D),1.5),1.5)+Math.pow(Math.pow(_(L*40+O),1.5)+Math.pow(_(z*40+q),1.5),1.5)>(K**1.5)**1.5*1.3};const c=r[o],d=l[l.length-1];u(d,c)?(s=!0,l[l.length-1]=l[l.length-1].join(c)):l.push(c)}r=l}while(i++<10&&s);const a=[];return Wh(r,(l,o,c)=>{let d=o;function u(R){return R.length>0&&R.trim().length<=3&&o.seq1Range.length+o.seq2Range.length>100}const f=e.extendToFullLines(o.seq1Range),m=e.getText(new j(f.start,o.seq1Range.start));u(m)&&(d=d.deltaStart(-m.length));const w=e.getText(new j(o.seq1Range.endExclusive,f.endExclusive));u(w)&&(d=d.deltaEnd(w.length));const y=ae.fromOffsetPairs(l?l.getEndExclusives():Ce.zero,c?c.getStarts():Ce.max),E=d.intersect(y);a.length>0&&E.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(E):a.push(E)}),a}class ro{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){const n=t===0?0:io(this.lines[t-1]),r=t===this.lines.length?0:io(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(` `)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}}function io(e){let t=0;for(;tD===L))return new Un([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Un([new Je(new B(1,t.length+1),new B(1,n.length+1),[new dt(new se(1,1,t.length,t[t.length-1].length+1),new se(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?on.instance:new Dd(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function l(D){let L=a.get(D);return L===void 0&&(L=a.size,a.set(D,L)),L}const o=t.map(D=>l(D.trim())),c=n.map(D=>l(D.trim())),d=new ro(o,t),u=new ro(c,n),f=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(D,L)=>t[D]===n[L]?n[L].length===0?.1:1+Math.log(1+n[L].length):.99):this.myersDiffingAlgorithm.compute(d,u,i);let m=f.diffs,w=f.hitTimeout;m=eo(d,u,m),m=qd(d,u,m);const y=[],E=D=>{if(s)for(let L=0;LD.seq1Range.start-R===D.seq2Range.start-N);const L=D.seq1Range.start-R;E(L),R=D.seq1Range.endExclusive,N=D.seq2Range.endExclusive;const O=this.refineDiff(t,n,D,i,s);O.hitTimeout&&(w=!0);for(const z of O.mappings)y.push(z)}E(t.length-R);const C=so(y,t,n);let I=[];return r.computeMoves&&(I=this.computeMoves(C,t,n,o,c,i,s)),Vn(()=>{function D(O,z){if(O.lineNumber<1||O.lineNumber>z.length)return!1;const q=z[O.lineNumber-1];return!(O.column<1||O.column>q.length+1)}function L(O,z){return!(O.startLineNumber<1||O.startLineNumber>z.length+1||O.endLineNumberExclusive<1||O.endLineNumberExclusive>z.length+1)}for(const O of C){if(!O.innerChanges)return!1;for(const z of O.innerChanges)if(!(D(z.modifiedRange.getStartPosition(),n)&&D(z.modifiedRange.getEndPosition(),n)&&D(z.originalRange.getStartPosition(),t)&&D(z.originalRange.getEndPosition(),t)))return!1;if(!L(O.modified,n)||!L(O.original,t))return!1}return!0}),new Un(C,I,w)}computeMoves(t,n,r,i,s,a,l){return Ld(t,n,r,i,s,a).map(d=>{const u=this.refineDiff(n,r,new ae(d.original.toOffsetRange(),d.modified.toOffsetRange()),a,l),f=so(u.mappings,n,r,!0);return new xd(d,f)})}refineDiff(t,n,r,i,s){const a=new $n(t,r.seq1Range,s),l=new $n(n,r.seq2Range,s),o=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,i):this.myersDiffingAlgorithm.compute(a,l,i);let c=o.diffs;return c=eo(a,l,c),c=$d(a,l,c),c=Ud(a,l,c),c=jd(a,l,c),{mappings:c.map(u=>new dt(a.translateRange(u.seq1Range),l.translateRange(u.seq2Range))),hitTimeout:o.hitTimeout}}}function so(e,t,n,r=!1){const i=[];for(const s of Th(e.map(a=>Gd(a,t,n)),(a,l)=>a.original.overlapOrTouch(l.original)||a.modified.overlapOrTouch(l.modified))){const a=s[0],l=s[s.length-1];i.push(new Je(a.original.join(l.original),a.modified.join(l.modified),s.map(o=>o.innerChanges[0])))}return Vn(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)?!1:Ba(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);const s=new B(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),a=new B(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new Je(s,a,[e])}const ao={getLegacy:()=>new kd,getDefault:()=>new Hd};function ut(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class ue{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=ut(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}}class Fe{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=ut(Math.max(Math.min(1,n),0),3),this.l=ut(Math.max(Math.min(1,r),0),3),this.a=ut(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,a=Math.max(n,r,i),l=Math.min(n,r,i);let o=0,c=0;const d=(l+a)/2,u=a-l;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),a){case n:o=(r-i)/u+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){const n=t.h/360,{s:r,l:i,a:s}=t;let a,l,o;if(r===0)a=l=o=i;else{const c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;a=Fe._hue2rgb(d,c,n+1/3),l=Fe._hue2rgb(d,c,n),o=Fe._hue2rgb(d,c,n-1/3)}return new ue(Math.round(a*255),Math.round(l*255),Math.round(o*255),s)}}class Ut{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=ut(Math.max(Math.min(1,n),0),3),this.v=ut(Math.max(Math.min(1,r),0),3),this.a=ut(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),l=s-a,o=s===0?0:l/s;let c;return l===0?c=0:s===n?c=((r-i)/l%6+6)%6:s===r?c=(i-n)/l+2:c=(n-r)/l+4,new Ut(Math.round(c*60),o,s,t.a)}static toRGBA(t){const{h:n,s:r,v:i,a:s}=t,a=i*r,l=a*(1-Math.abs(n/60%2-1)),o=i-a;let[c,d,u]=[0,0,0];return n<60?(c=a,d=l):n<120?(c=l,d=a):n<180?(d=a,u=l):n<240?(d=l,u=a):n<300?(c=l,u=a):n<=360&&(c=a,u=l),c=Math.round((c+o)*255),d=Math.round((d+o)*255),u=Math.round((u+o)*255),new ue(c,d,u,s)}}let he=class Ie{static fromHex(t){return Ie.Format.CSS.parseHex(t)||Ie.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Fe.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Ut.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof ue)this.rgba=t;else if(t instanceof Fe)this._hsla=t,this.rgba=Fe.toRGBA(t);else if(t instanceof Ut)this._hsva=t,this.rgba=Ut.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&ue.equals(this.rgba,t.rgba)&&Fe.equals(this.hsla,t.hsla)&&Ut.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=Ie._relativeLuminanceForComponent(this.rgba.r),n=Ie._relativeLuminanceForComponent(this.rgba.g),r=Ie._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return ut(i,4)}static _relativeLuminanceForComponent(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(const i of r){const s=i.filter(c=>c!==void 0),a=s[1],l=s[2];if(!l)continue;let o;if(a==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=lo(ln(e,i),cn(l,c),!1)}else if(a==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=lo(ln(e,i),cn(l,c),!0)}else if(a==="hsl"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=co(ln(e,i),cn(l,c),!1)}else if(a==="hsla"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=co(ln(e,i),cn(l,c),!0)}else a==="#"&&(o=Jd(ln(e,i),a+l));o&&t.push(o)}return t}function Yd(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:Xd(e)}const ho=new RegExp("\\bMARK:\\s*(.*)$","d"),Qd=/^-+|-+$/g;function Kd(e,t){var n;let r=[];if(t.findRegionSectionHeaders&&(!((n=t.foldingRules)===null||n===void 0)&&n.markers)){const i=Zd(e,t);r=r.concat(i)}if(t.findMarkSectionHeaders){const i=eu(e);r=r.concat(i)}return r}function Zd(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const s=e.getLineContent(i),a=s.match(t.foldingRules.markers.start);if(a){const l={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:s.length+1};if(l.endColumn>l.startColumn){const o={range:l,...uo(s.substring(a[0].length)),shouldBeInComments:!1};(o.text||o.hasSeparatorLine)&&n.push(o)}}}return n}function eu(e){const t=[],n=e.getLineCount();for(let r=1;r<=n;r++){const i=e.getLineContent(r);tu(i,r,t)}return t}function tu(e,t,n){ho.lastIndex=0;const r=ho.exec(e);if(r){const i=r.indices[1][0]+1,s=r.indices[1][1]+1,a={startLineNumber:t,startColumn:i,endLineNumber:t,endColumn:s};if(a.endColumn>a.startColumn){const l={range:a,...uo(r[1]),shouldBeInComments:!0};(l.text||l.hasSeparatorLine)&&n.push(l)}}}function uo(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(Qd,""),{text:e,hasSeparatorLine:t}}class nu extends qh{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const 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}:t}}class xt{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){const t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new nu(Ir.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){this._models[t]&&delete this._models[t]}async computeUnicodeHighlights(t,n,r){const i=this._getModel(t);return i?wd.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async findSectionHeaders(t,n){const r=this._getModel(t);return r?Kd(r,n):[]}async computeDiff(t,n,r,i){const s=this._getModel(t),a=this._getModel(n);return!s||!a?null:xt.computeDiff(s,a,r,i)}static computeDiff(t,n,r,i){const s=i==="advanced"?ao.getDefault():ao.getLegacy(),a=t.getLinesContent(),l=n.getLinesContent(),o=s.computeDiff(a,l,r),c=o.changes.length>0?!1:this._modelsAreIdentical(t,n);function d(u){return u.map(f=>{var m;return[f.original.startLineNumber,f.original.endLineNumberExclusive,f.modified.startLineNumber,f.modified.endLineNumberExclusive,(m=f.innerChanges)===null||m===void 0?void 0:m.map(w=>[w.originalRange.startLineNumber,w.originalRange.startColumn,w.originalRange.endLineNumber,w.originalRange.endColumn,w.modifiedRange.startLineNumber,w.modifiedRange.startColumn,w.modifiedRange.endLineNumber,w.modifiedRange.endColumn])]})}return{identical:c,quitEarly:o.hitTimeout,changes:d(o.changes),moves:o.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,d(u.changes)])}}static _modelsAreIdentical(t,n){const r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=t.getLineContent(s),l=n.getLineContent(s);if(a!==l)return!1}return!0}async computeMoreMinimalEdits(t,n,r){const i=this._getModel(t);if(!i)return n;const s=[];let a;n=n.slice(0).sort((o,c)=>{if(o.range&&c.range)return se.compareRangesUsingStarts(o.range,c.range);const d=o.range?0:1,u=c.range?0:1;return d-u});let l=0;for(let o=1;oxt._diffLimit){s.push({range:o,text:c});continue}const f=vh(u,c,r),m=i.offsetAt(se.lift(o).getStartPosition());for(const w of f){const y=i.positionAt(m+w.originalStart),E=i.positionAt(m+w.originalStart+w.originalLength),R={text:c.substr(w.modifiedStart,w.modifiedLength),range:{startLineNumber:y.lineNumber,startColumn:y.column,endLineNumber:E.lineNumber,endColumn:E.column}};i.getValueInRange(R.range)!==R.text&&s.push(R)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async computeLinks(t){const n=this._getModel(t);return n?Kh(n):null}async computeDefaultDocumentColors(t){const n=this._getModel(t);return n?Yd(n):null}async textualSuggest(t,n,r,i){const s=new Dn,a=new RegExp(r,i),l=new Set;e:for(const o of t){const c=this._getModel(o);if(c){for(const d of c.words(a))if(!(d===n||!isNaN(Number(d)))&&(l.add(d),l.size>xt._suggestionsLimit))break e}}return{words:Array.from(l),duration:s.elapsed()}}async computeWordRanges(t,n,r,i){const s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(r,i),l=Object.create(null);for(let o=n.startLineNumber;othis._host.fhr(l,o)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,n),Promise.resolve(xr(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}}xt._diffLimit=1e5,xt._suggestionsLimit=1e4,typeof importScripts=="function"&&(globalThis.monaco=cd());let Kr=!1;function po(e){if(Kr)return;Kr=!0;const t=new gh(n=>{globalThis.postMessage(n)},n=>new xt(n,e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{Kr||po(null)};/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var p;(function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.ContainerQueryLength=42]="ContainerQueryLength",e[e.CustomToken=43]="CustomToken"})(p||(p={}));var mo=class{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;tt&&n===So?(e=!0,!1):(t=n===Zr,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,t;return this.stream.peekChar()===ko&&(e=1),t=this.stream.peekChar(e),t>=hn&&t<=dn?(this.stream.advance(e+1),this.stream.advanceWhileChar(n=>n>=hn&&n<=dn||e===0&&n===ko),!0):!1}_newline(e){const t=this.stream.peekChar();switch(t){case Bt:case pn:case $t:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===Bt&&this.stream.advanceIfChar($t)&&e.push(` `),!0}return!1}_escape(e,t){let n=this.stream.peekChar();if(n===ei){this.stream.advance(1),n=this.stream.peekChar();let r=0;for(;r<6&&(n>=hn&&n<=dn||n>=Bn&&n<=fo||n>=qn&&n<=bo);)this.stream.advance(1),n=this.stream.peekChar(),r++;if(r>0){try{const i=parseInt(this.stream.substring(this.stream.pos()-r),16);i&&e.push(String.fromCharCode(i))}catch{}return n===ti||n===ni?this.stream.advance(1):this._newline([]),!0}if(n!==Bt&&n!==pn&&n!==$t)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){const n=this.stream.peekChar();return n!==0&&n!==e&&n!==ei&&n!==Bt&&n!==pn&&n!==$t?(this.stream.advance(1),t.push(String.fromCharCode(n)),!0):!1}_string(e){if(this.stream.peekChar()===_o||this.stream.peekChar()===Co){const t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),p.String):p.BadString}return null}_unquotedChar(e){const t=this.stream.peekChar();return t!==0&&t!==ei&&t!==_o&&t!==Co&&t!==yo&&t!==xo&&t!==ti&&t!==ni&&t!==$t&&t!==pn&&t!==Bt?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(t=>t===ti||t===ni||t===$t||t===pn||t===Bt)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){const t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||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(t),!1}_identFirstChar(e){const t=this.stream.peekChar();return t===wo||t>=Bn&&t<=go||t>=qn&&t<=vo||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_minus(e){const t=this.stream.peekChar();return t===St?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_identChar(e){const t=this.stream.peekChar();return t===wo||t===St||t>=Bn&&t<=go||t>=qn&&t<=vo||t>=hn&&t<=dn||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(yu)){const e=n=>n>=hn&&n<=dn||n>=Bn&&n<=fo||n>=qn&&n<=bo,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(n=>n===wu);if(t>=1&&t<=6)if(this.stream.advanceIfChar(St)){const n=this.stream.advanceWhileChar(e);if(n>=1&&n<=6)return!0}else return!0}return!1}};function de(e,t){if(e.length0?e.lastIndexOf(t)===n:n===0?e===t:!1}function xu(e,t,n=4){let r=Math.abs(e.length-t.length);if(r>n)return 0;let i=[],s=[],a,l;for(a=0;a0;)(t&1)===1&&(n+=e),e+=e,t=t>>>1;return n}var b;(function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.RatioValue=33]="RatioValue",e[e.MixinDeclaration=34]="MixinDeclaration",e[e.MixinReference=35]="MixinReference",e[e.VariableName=36]="VariableName",e[e.VariableDeclaration=37]="VariableDeclaration",e[e.Prio=38]="Prio",e[e.Interpolation=39]="Interpolation",e[e.NestedProperties=40]="NestedProperties",e[e.ExtendsReference=41]="ExtendsReference",e[e.SelectorPlaceholder=42]="SelectorPlaceholder",e[e.Debug=43]="Debug",e[e.If=44]="If",e[e.Else=45]="Else",e[e.For=46]="For",e[e.Each=47]="Each",e[e.While=48]="While",e[e.MixinContentReference=49]="MixinContentReference",e[e.MixinContentDeclaration=50]="MixinContentDeclaration",e[e.Media=51]="Media",e[e.Keyframe=52]="Keyframe",e[e.FontFace=53]="FontFace",e[e.Import=54]="Import",e[e.Namespace=55]="Namespace",e[e.Invocation=56]="Invocation",e[e.FunctionDeclaration=57]="FunctionDeclaration",e[e.ReturnStatement=58]="ReturnStatement",e[e.MediaQuery=59]="MediaQuery",e[e.MediaCondition=60]="MediaCondition",e[e.MediaFeature=61]="MediaFeature",e[e.FunctionParameter=62]="FunctionParameter",e[e.FunctionArgument=63]="FunctionArgument",e[e.KeyframeSelector=64]="KeyframeSelector",e[e.ViewPort=65]="ViewPort",e[e.Document=66]="Document",e[e.AtApplyRule=67]="AtApplyRule",e[e.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",e[e.CustomPropertySet=69]="CustomPropertySet",e[e.ListEntry=70]="ListEntry",e[e.Supports=71]="Supports",e[e.SupportsCondition=72]="SupportsCondition",e[e.NamespacePrefix=73]="NamespacePrefix",e[e.GridLine=74]="GridLine",e[e.Plugin=75]="Plugin",e[e.UnknownAtRule=76]="UnknownAtRule",e[e.Use=77]="Use",e[e.ModuleConfiguration=78]="ModuleConfiguration",e[e.Forward=79]="Forward",e[e.ForwardVisibility=80]="ForwardVisibility",e[e.Module=81]="Module",e[e.UnicodeRange=82]="UnicodeRange",e[e.Layer=83]="Layer",e[e.LayerNameList=84]="LayerNameList",e[e.LayerName=85]="LayerName",e[e.PropertyAtRule=86]="PropertyAtRule",e[e.Container=87]="Container"})(b||(b={}));var H;(function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility",e[e.Property=9]="Property"})(H||(H={}));function ri(e,t){let n=null;return!e||te.end?null:(e.accept(r=>r.offset===-1&&r.length===-1?!0:r.offset<=t&&r.end>=t?(n?r.length<=n.length&&(n=r):n=r,!0):!1),n)}function ii(e,t){let n=ri(e,t);const r=[];for(;n;)r.unshift(n),n=n.parent;return r}function Cu(e){const t=e.findParent(b.Declaration),n=t&&t.getValue();return n&&n.encloses(e)?t:null}var T=class{get end(){return this.offset+this.length}constructor(e=-1,t=-1,n){this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}set type(e){this.nodeType=e}get type(){return this.nodeType||b.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){const r=e.parent.children.indexOf(e);r>=0&&e.parent.children.splice(r,1)}e.parent=this;let n=this.children;return n||(n=this.children=[]),t!==-1?n.splice(t,0,e):n.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(t=>t.getRule()===e)}isErroneous(e=!1){return this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(t=>t.isErroneous(!0))}setNode(e,t,n=-1){return t?(t.attachTo(this,n),this[e]=t,!0):!1}addChild(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offsetthis.end||this.length===-1)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;n--)if(t=this.children[n],t.offset<=e)return t}return null}findChildAtOffset(e,t){const n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof be;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some(n=>t.type===n);)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}},be=class extends T{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}},_u=class extends T{constructor(e,t){super(e,t)}get type(){return b.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}},Re=class extends T{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return b.Identifier}containsInterpolation(){return this.hasChildren()}},ku=class extends T{constructor(e,t){super(e,t)}get type(){return b.Stylesheet}},si=class extends T{constructor(e,t){super(e,t)}get type(){return b.Declarations}},re=class extends T{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}},Ct=class extends re{constructor(e,t){super(e,t)}get type(){return b.Ruleset}getSelectors(){return this.selectors||(this.selectors=new be(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(b.Declarations)!==null}},fn=class extends T{constructor(e,t){super(e,t)}get type(){return b.Selector}},qt=class extends T{constructor(e,t){super(e,t)}get type(){return b.SimpleSelector}},ai=class extends T{constructor(e,t){super(e,t)}},Eu=class extends re{constructor(e,t){super(e,t)}get type(){return b.CustomPropertySet}},$e=class Rc extends ai{constructor(t,n){super(t,n),this.property=null}get type(){return b.Declaration}setProperty(t){return this.setNode("property",t)}getProperty(){return this.property}getFullPropertyName(){const t=this.property?this.property.getName():"unknown";if(this.parent instanceof si&&this.parent.getParent()instanceof Io){const n=this.parent.getParent().getParent();if(n instanceof Rc)return n.getFullPropertyName()+t}return t}getNonPrefixedPropertyName(){const t=this.getFullPropertyName();if(t&&t.charAt(0)==="-"){const n=t.indexOf("-",1);if(n!==-1)return t.substring(n+1)}return t}setValue(t){return this.setNode("value",t)}getValue(){return this.value}setNestedProperties(t){return this.setNode("nestedProperties",t)}getNestedProperties(){return this.nestedProperties}},Fu=class extends $e{constructor(e,t){super(e,t)}get type(){return b.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}},oi=class extends T{constructor(e,t){super(e,t)}get type(){return b.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return Su(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},Ru=class extends T{constructor(e,t){super(e,t)}get type(){return b.Invocation}getArguments(){return this.arguments||(this.arguments=new be(this)),this.arguments}},gn=class extends Ru{constructor(e,t){super(e,t)}get type(){return b.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},jn=class extends T{constructor(e,t){super(e,t)}get type(){return b.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}},jt=class extends T{constructor(e,t){super(e,t)}get type(){return b.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},Du=class extends re{constructor(e,t){super(e,t)}get type(){return b.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}},Nu=class extends re{constructor(e,t){super(e,t)}get type(){return b.For}setVariable(e){return this.setNode("variable",e,0)}},Iu=class extends re{constructor(e,t){super(e,t)}get type(){return b.Each}getVariables(){return this.variables||(this.variables=new be(this)),this.variables}},Au=class extends re{constructor(e,t){super(e,t)}get type(){return b.While}},Mu=class extends re{constructor(e,t){super(e,t)}get type(){return b.Else}},Hn=class extends re{constructor(e,t){super(e,t)}get type(){return b.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new be(this)),this.parameters}},Lu=class extends re{constructor(e,t){super(e,t)}get type(){return b.ViewPort}},No=class extends re{constructor(e,t){super(e,t)}get type(){return b.FontFace}},Io=class extends re{constructor(e,t){super(e,t)}get type(){return b.NestedProperties}},Ao=class extends re{constructor(e,t){super(e,t)}get type(){return b.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},Mo=class extends re{constructor(e,t){super(e,t)}get type(){return b.KeyframeSelector}},li=class extends T{constructor(e,t){super(e,t)}get type(){return b.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}},zu=class extends T{get type(){return b.Use}getParameters(){return this.parameters||(this.parameters=new be(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Pu=class extends T{get type(){return b.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},Tu=class extends T{get type(){return b.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new be(this)),this.members}getParameters(){return this.parameters||(this.parameters=new be(this)),this.parameters}},Ou=class extends T{get type(){return b.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Wu=class extends T{constructor(e,t){super(e,t)}get type(){return b.Namespace}},ci=class extends re{constructor(e,t){super(e,t)}get type(){return b.Media}},hi=class extends re{constructor(e,t){super(e,t)}get type(){return b.Supports}},Vu=class extends re{constructor(e,t){super(e,t)}get type(){return b.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}},Uu=class extends re{constructor(e,t){super(e,t)}get type(){return b.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}},$u=class extends re{constructor(e,t){super(e,t)}get type(){return b.Document}},Bu=class extends re{constructor(e,t){super(e,t)}get type(){return b.Container}},Lo=class extends T{constructor(e,t){super(e,t)}},zo=class extends T{constructor(e,t){super(e,t)}get type(){return b.MediaQuery}},qu=class extends T{constructor(e,t){super(e,t)}get type(){return b.MediaCondition}},ju=class extends T{constructor(e,t){super(e,t)}get type(){return b.MediaFeature}},bn=class extends T{constructor(e,t){super(e,t)}get type(){return b.SupportsCondition}},Hu=class extends re{constructor(e,t){super(e,t)}get type(){return b.Page}},Gu=class extends re{constructor(e,t){super(e,t)}get type(){return b.PageBoxMarginBox}},Po=class extends T{constructor(e,t){super(e,t)}get type(){return b.Expression}},di=class extends T{constructor(e,t){super(e,t)}get type(){return b.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}},Ju=class extends T{constructor(e,t){super(e,t)}get type(){return b.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}},Xu=class extends T{constructor(e,t){super(e,t)}get type(){return b.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}},ui=class extends T{constructor(e,t){super(e,t)}get type(){return b.HexColorValue}},Yu=class extends T{constructor(e,t){super(e,t)}get type(){return b.RatioValue}},Qu=46,Ku=48,Zu=57,pi=class extends T{constructor(e,t){super(e,t)}get type(){return b.NumericValue}getValue(){const e=this.getText();let t=0,n;for(let r=0,i=e.length;r0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};return op(r,i)}var ap=/{([^}]+)}/g;function op(e,t){return Object.keys(t).length===0?e:e.replace(ap,(n,r)=>t[r]??n)}var X=class{constructor(e,t){this.id=e,this.message=t}},x={NumberExpected:new X("css-numberexpected",g("number expected")),ConditionExpected:new X("css-conditionexpected",g("condition expected")),RuleOrSelectorExpected:new X("css-ruleorselectorexpected",g("at-rule or selector expected")),DotExpected:new X("css-dotexpected",g("dot expected")),ColonExpected:new X("css-colonexpected",g("colon expected")),SemiColonExpected:new X("css-semicolonexpected",g("semi-colon expected")),TermExpected:new X("css-termexpected",g("term expected")),ExpressionExpected:new X("css-expressionexpected",g("expression expected")),OperatorExpected:new X("css-operatorexpected",g("operator expected")),IdentifierExpected:new X("css-identifierexpected",g("identifier expected")),PercentageExpected:new X("css-percentageexpected",g("percentage expected")),URIOrStringExpected:new X("css-uriorstringexpected",g("uri or string expected")),URIExpected:new X("css-uriexpected",g("URI expected")),VariableNameExpected:new X("css-varnameexpected",g("variable name expected")),VariableValueExpected:new X("css-varvalueexpected",g("variable value expected")),PropertyValueExpected:new X("css-propertyvalueexpected",g("property value expected")),LeftCurlyExpected:new X("css-lcurlyexpected",g("{ expected")),RightCurlyExpected:new X("css-rcurlyexpected",g("} expected")),LeftSquareBracketExpected:new X("css-rbracketexpected",g("[ expected")),RightSquareBracketExpected:new X("css-lbracketexpected",g("] expected")),LeftParenthesisExpected:new X("css-lparentexpected",g("( expected")),RightParenthesisExpected:new X("css-rparentexpected",g(") expected")),CommaExpected:new X("css-commaexpected",g("comma expected")),PageDirectiveOrDeclarationExpected:new X("css-pagedirordeclexpected",g("page directive or declaraton expected")),UnknownAtRule:new X("css-unknownatrule",g("at-rule unknown")),UnknownKeyword:new X("css-unknownkeyword",g("unknown keyword")),SelectorExpected:new X("css-selectorexpected",g("selector expected")),StringLiteralExpected:new X("css-stringliteralexpected",g("string literal expected")),WhitespaceExpected:new X("css-whitespaceexpected",g("whitespace expected")),MediaQueryExpected:new X("css-mediaqueryexpected",g("media query expected")),IdentifierOrWildcardExpected:new X("css-idorwildcardexpected",g("identifier or wildcard expected")),WildcardExpected:new X("css-wildcardexpected",g("wildcard expected")),IdentifierOrVariableExpected:new X("css-idorvarexpected",g("identifier or variable expected"))},Vo;(function(e){function t(n){return typeof n=="string"}e.is=t})(Vo||(Vo={}));var gi;(function(e){function t(n){return typeof n=="string"}e.is=t})(gi||(gi={}));var Uo;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Uo||(Uo={}));var Xn;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Xn||(Xn={}));var ve;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=Xn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Xn.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return S.objectLiteral(i)&&S.uinteger(i.line)&&S.uinteger(i.character)}e.is=n})(ve||(ve={}));var G;(function(e){function t(r,i,s,a){if(S.uinteger(r)&&S.uinteger(i)&&S.uinteger(s)&&S.uinteger(a))return{start:ve.create(r,i),end:ve.create(s,a)};if(ve.is(r)&&ve.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}e.create=t;function n(r){let i=r;return S.objectLiteral(i)&&ve.is(i.start)&&ve.is(i.end)}e.is=n})(G||(G={}));var yn;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return S.objectLiteral(i)&&G.is(i.range)&&(S.string(i.uri)||S.undefined(i.uri))}e.is=n})(yn||(yn={}));var $o;(function(e){function t(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function n(r){let i=r;return S.objectLiteral(i)&&G.is(i.targetRange)&&S.string(i.targetUri)&&G.is(i.targetSelectionRange)&&(G.is(i.originSelectionRange)||S.undefined(i.originSelectionRange))}e.is=n})($o||($o={}));var bi;(function(e){function t(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}e.create=t;function n(r){const i=r;return S.objectLiteral(i)&&S.numberRange(i.red,0,1)&&S.numberRange(i.green,0,1)&&S.numberRange(i.blue,0,1)&&S.numberRange(i.alpha,0,1)}e.is=n})(bi||(bi={}));var Bo;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){const i=r;return S.objectLiteral(i)&&G.is(i.range)&&bi.is(i.color)}e.is=n})(Bo||(Bo={}));var qo;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){const i=r;return S.objectLiteral(i)&&S.string(i.label)&&(S.undefined(i.textEdit)||U.is(i))&&(S.undefined(i.additionalTextEdits)||S.typedArray(i.additionalTextEdits,U.is))}e.is=n})(qo||(qo={}));var jo;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(jo||(jo={}));var Ho;(function(e){function t(r,i,s,a,l,o){const c={startLine:r,endLine:i};return S.defined(s)&&(c.startCharacter=s),S.defined(a)&&(c.endCharacter=a),S.defined(l)&&(c.kind=l),S.defined(o)&&(c.collapsedText=o),c}e.create=t;function n(r){const i=r;return S.objectLiteral(i)&&S.uinteger(i.startLine)&&S.uinteger(i.startLine)&&(S.undefined(i.startCharacter)||S.uinteger(i.startCharacter))&&(S.undefined(i.endCharacter)||S.uinteger(i.endCharacter))&&(S.undefined(i.kind)||S.string(i.kind))}e.is=n})(Ho||(Ho={}));var vi;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return S.defined(i)&&yn.is(i.location)&&S.string(i.message)}e.is=n})(vi||(vi={}));var Yn;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Yn||(Yn={}));var Go;(function(e){e.Unnecessary=1,e.Deprecated=2})(Go||(Go={}));var Jo;(function(e){function t(n){const r=n;return S.objectLiteral(r)&&S.string(r.href)}e.is=t})(Jo||(Jo={}));var Qn;(function(e){function t(r,i,s,a,l,o){let c={range:r,message:i};return S.defined(s)&&(c.severity=s),S.defined(a)&&(c.code=a),S.defined(l)&&(c.source=l),S.defined(o)&&(c.relatedInformation=o),c}e.create=t;function n(r){var i;let s=r;return S.defined(s)&&G.is(s.range)&&S.string(s.message)&&(S.number(s.severity)||S.undefined(s.severity))&&(S.integer(s.code)||S.string(s.code)||S.undefined(s.code))&&(S.undefined(s.codeDescription)||S.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(S.string(s.source)||S.undefined(s.source))&&(S.undefined(s.relatedInformation)||S.typedArray(s.relatedInformation,vi.is))}e.is=n})(Qn||(Qn={}));var _t;(function(e){function t(r,i,...s){let a={title:r,command:i};return S.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return S.defined(i)&&S.string(i.title)&&S.string(i.command)}e.is=n})(_t||(_t={}));var U;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function n(s,a){return{range:{start:s,end:s},newText:a}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){const a=s;return S.objectLiteral(a)&&S.string(a.newText)&&G.is(a.range)}e.is=i})(U||(U={}));var wi;(function(e){function t(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){const i=r;return S.objectLiteral(i)&&S.string(i.label)&&(S.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(S.string(i.description)||i.description===void 0)}e.is=n})(wi||(wi={}));var Ht;(function(e){function t(n){const r=n;return S.string(r)}e.is=t})(Ht||(Ht={}));var Xo;(function(e){function t(s,a,l){return{range:s,newText:a,annotationId:l}}e.replace=t;function n(s,a,l){return{range:{start:s,end:s},newText:a,annotationId:l}}e.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}e.del=r;function i(s){const a=s;return U.is(a)&&(wi.is(a.annotationId)||Ht.is(a.annotationId))}e.is=i})(Xo||(Xo={}));var Kn;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return S.defined(i)&&ki.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(Kn||(Kn={}));var yi;(function(e){function t(r,i,s){let 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}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&S.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}e.is=n})(yi||(yi={}));var xi;(function(e){function t(r,i,s,a){let l={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),a!==void 0&&(l.annotationId=a),l}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&S.string(i.oldUri)&&S.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}e.is=n})(xi||(xi={}));var Si;(function(e){function t(r,i,s){let 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}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&S.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||S.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||S.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}e.is=n})(Si||(Si={}));var Ci;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>S.string(i.kind)?yi.is(i)||xi.is(i)||Si.is(i):Kn.is(i)))}e.is=t})(Ci||(Ci={}));var Yo;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)}e.is=n})(Yo||(Yo={}));var _i;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)&&S.integer(i.version)}e.is=n})(_i||(_i={}));var ki;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)&&(i.version===null||S.integer(i.version))}e.is=n})(ki||(ki={}));var Qo;(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){let i=r;return S.defined(i)&&S.string(i.uri)&&S.string(i.languageId)&&S.integer(i.version)&&S.string(i.text)}e.is=n})(Qo||(Qo={}));var Be;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Be||(Be={}));var xn;(function(e){function t(n){const r=n;return S.objectLiteral(n)&&Be.is(r.kind)&&S.string(r.value)}e.is=t})(xn||(xn={}));var V;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(V||(V={}));var ke;(function(e){e.PlainText=1,e.Snippet=2})(ke||(ke={}));var kt;(function(e){e.Deprecated=1})(kt||(kt={}));var Ko;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){const i=r;return i&&S.string(i.newText)&&G.is(i.insert)&&G.is(i.replace)}e.is=n})(Ko||(Ko={}));var Zo;(function(e){e.asIs=1,e.adjustIndentation=2})(Zo||(Zo={}));var el;(function(e){function t(n){const r=n;return r&&(S.string(r.detail)||r.detail===void 0)&&(S.string(r.description)||r.description===void 0)}e.is=t})(el||(el={}));var tl;(function(e){function t(n){return{label:n}}e.create=t})(tl||(tl={}));var nl;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(nl||(nl={}));var Zn;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return S.string(i)||S.objectLiteral(i)&&S.string(i.language)&&S.string(i.value)}e.is=n})(Zn||(Zn={}));var rl;(function(e){function t(n){let r=n;return!!r&&S.objectLiteral(r)&&(xn.is(r.contents)||Zn.is(r.contents)||S.typedArray(r.contents,Zn.is))&&(n.range===void 0||G.is(n.range))}e.is=t})(rl||(rl={}));var il;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(il||(il={}));var sl;(function(e){function t(n,r,...i){let s={label:n};return S.defined(r)&&(s.documentation=r),S.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(sl||(sl={}));var Gt;(function(e){e.Text=1,e.Read=2,e.Write=3})(Gt||(Gt={}));var al;(function(e){function t(n,r){let i={range:n};return S.number(r)&&(i.kind=r),i}e.create=t})(al||(al={}));var Ye;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Ye||(Ye={}));var ol;(function(e){e.Deprecated=1})(ol||(ol={}));var ll;(function(e){function t(n,r,i,s,a){let l={name:n,kind:r,location:{uri:s,range:i}};return a&&(l.containerName=a),l}e.create=t})(ll||(ll={}));var cl;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(cl||(cl={}));var hl;(function(e){function t(r,i,s,a,l,o){let c={name:r,detail:i,kind:s,range:a,selectionRange:l};return o!==void 0&&(c.children=o),c}e.create=t;function n(r){let i=r;return i&&S.string(i.name)&&S.number(i.kind)&&G.is(i.range)&&G.is(i.selectionRange)&&(i.detail===void 0||S.string(i.detail))&&(i.deprecated===void 0||S.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(hl||(hl={}));var Ei;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Ei||(Ei={}));var er;(function(e){e.Invoked=1,e.Automatic=2})(er||(er={}));var dl;(function(e){function t(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function n(r){let i=r;return S.defined(i)&&S.typedArray(i.diagnostics,Qn.is)&&(i.only===void 0||S.typedArray(i.only,S.string))&&(i.triggerKind===void 0||i.triggerKind===er.Invoked||i.triggerKind===er.Automatic)}e.is=n})(dl||(dl={}));var Fi;(function(e){function t(r,i,s){let a={title:r},l=!0;return typeof i=="string"?(l=!1,a.kind=i):_t.is(i)?a.command=i:a.edit=i,l&&s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return i&&S.string(i.title)&&(i.diagnostics===void 0||S.typedArray(i.diagnostics,Qn.is))&&(i.kind===void 0||S.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||_t.is(i.command))&&(i.isPreferred===void 0||S.boolean(i.isPreferred))&&(i.edit===void 0||Ci.is(i.edit))}e.is=n})(Fi||(Fi={}));var ul;(function(e){function t(r,i){let s={range:r};return S.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return S.defined(i)&&G.is(i.range)&&(S.undefined(i.command)||_t.is(i.command))}e.is=n})(ul||(ul={}));var pl;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return S.defined(i)&&S.uinteger(i.tabSize)&&S.boolean(i.insertSpaces)}e.is=n})(pl||(pl={}));var ml;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return S.defined(i)&&G.is(i.range)&&(S.undefined(i.target)||S.string(i.target))}e.is=n})(ml||(ml={}));var tr;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return S.objectLiteral(i)&&G.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(tr||(tr={}));var fl;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(fl||(fl={}));var gl;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(gl||(gl={}));var bl;(function(e){function t(n){const r=n;return S.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(bl||(bl={}));var vl;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&G.is(i.range)&&S.string(i.text)}e.is=n})(vl||(vl={}));var wl;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){const i=r;return i!=null&&G.is(i.range)&&S.boolean(i.caseSensitiveLookup)&&(S.string(i.variableName)||i.variableName===void 0)}e.is=n})(wl||(wl={}));var yl;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&G.is(i.range)&&(S.string(i.expression)||i.expression===void 0)}e.is=n})(yl||(yl={}));var xl;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return S.defined(i)&&G.is(r.stoppedLocation)}e.is=n})(xl||(xl={}));var Ri;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Ri||(Ri={}));var Di;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return S.objectLiteral(i)&&(i.tooltip===void 0||S.string(i.tooltip)||xn.is(i.tooltip))&&(i.location===void 0||yn.is(i.location))&&(i.command===void 0||_t.is(i.command))}e.is=n})(Di||(Di={}));var Sl;(function(e){function t(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function n(r){const i=r;return S.objectLiteral(i)&&ve.is(i.position)&&(S.string(i.label)||S.typedArray(i.label,Di.is))&&(i.kind===void 0||Ri.is(i.kind))&&i.textEdits===void 0||S.typedArray(i.textEdits,U.is)&&(i.tooltip===void 0||S.string(i.tooltip)||xn.is(i.tooltip))&&(i.paddingLeft===void 0||S.boolean(i.paddingLeft))&&(i.paddingRight===void 0||S.boolean(i.paddingRight))}e.is=n})(Sl||(Sl={}));var Cl;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(Cl||(Cl={}));var _l;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(_l||(_l={}));var kl;(function(e){function t(n){return{items:n}}e.create=t})(kl||(kl={}));var El;(function(e){e.Invoked=0,e.Automatic=1})(El||(El={}));var Fl;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Fl||(Fl={}));var Rl;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Rl||(Rl={}));var Dl;(function(e){function t(n){const r=n;return S.objectLiteral(r)&&gi.is(r.uri)&&S.string(r.name)}e.is=t})(Dl||(Dl={}));var Nl;(function(e){function t(s,a,l,o){return new lp(s,a,l,o)}e.create=t;function n(s){let a=s;return!!(S.defined(a)&&S.string(a.uri)&&(S.undefined(a.languageId)||S.string(a.languageId))&&S.uinteger(a.lineCount)&&S.func(a.getText)&&S.func(a.positionAt)&&S.func(a.offsetAt))}e.is=n;function r(s,a){let l=s.getText(),o=i(a,(d,u)=>{let f=d.range.start.line-u.range.start.line;return f===0?d.range.start.character-u.range.start.character:f}),c=l.length;for(let d=o.length-1;d>=0;d--){let u=o[d],f=s.offsetAt(u.range.start),m=s.offsetAt(u.range.end);if(m<=c)l=l.substring(0,f)+u.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");c=f}return l}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;const l=s.length/2|0,o=s.slice(0,l),c=s.slice(l);i(o,a),i(c,a);let d=0,u=0,f=0;for(;d0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return ve.create(0,e);for(;ne?r=s:n=s+1}let i=n-1;return ve.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1"u"}e.undefined=r;function i(m){return m===!0||m===!1}e.boolean=i;function s(m){return t.call(m)==="[object String]"}e.string=s;function a(m){return t.call(m)==="[object Number]"}e.number=a;function l(m,w,y){return t.call(m)==="[object Number]"&&w<=m&&m<=y}e.numberRange=l;function o(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=o;function c(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=c;function d(m){return t.call(m)==="[object Function]"}e.func=d;function u(m){return m!==null&&typeof m=="object"}e.objectLiteral=u;function f(m,w){return Array.isArray(m)&&m.every(w)}e.typedArray=f})(S||(S={}));var Il=class cs{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(cs.isIncremental(r)){const i=Ml(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const l=Math.max(i.start.line,0),o=Math.max(i.end.line,0);let c=this._lineOffsets;const d=Al(r.text,!1,s);if(o-l===d.length)for(let f=0,m=d.length;ft?i=a:r=a+1}let s=r-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1{let f=d.range.start.line-u.range.start.line;return f===0?d.range.start.character-u.range.start.character:f}),o=0;const c=[];for(const d of l){let u=i.offsetAt(d.range.start);if(uo&&c.push(a.substring(o,u)),d.newText.length&&c.push(d.newText),o=i.offsetAt(d.range.end)}return c.push(a.substr(o)),c.join("")}e.applyEdits=r})(Ni||(Ni={}));function Ii(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Ii(r,t),Ii(i,t);let s=0,a=0,l=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function cp(e){const t=Ml(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Ll;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Be.Markdown,Be.PlainText]}},hover:{contentFormat:[Be.Markdown,Be.PlainText]}}}})(Ll||(Ll={}));var Sn;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"})(Sn||(Sn={}));var zl={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function Pl(e){switch(e){case"experimental":return`⚠️ Property is experimental. Be cautious when using it.️ `;case"nonstandard":return`🚨️ Property is nonstandard. Avoid using it. `;case"obsolete":return`🚨️️️ Property is obsolete. Avoid using it. `;default:return""}}function pt(e,t,n){let r;if(t?r={kind:"markdown",value:dp(e,n)}:r={kind:"plaintext",value:hp(e,n)},r.value!=="")return r}function nr(e){return e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),e.replace(//g,">")}function hp(e,t){if(!e.description||e.description==="")return"";if(typeof e.description!="string")return e.description.value;let n="";if((t==null?void 0:t.documentation)!==!1){e.status&&(n+=Pl(e.status)),n+=e.description;const r=Tl(e.browsers);r&&(n+=` (`+r+")"),"syntax"in e&&(n+=` Syntax: ${e.syntax}`)}return e.references&&e.references.length>0&&(t==null?void 0:t.references)!==!1&&(n.length>0&&(n+=` `),n+=e.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function dp(e,t){if(!e.description||e.description==="")return"";let n="";if((t==null?void 0:t.documentation)!==!1){e.status&&(n+=Pl(e.status)),typeof e.description=="string"?n+=nr(e.description):n+=e.description.kind===Be.Markdown?e.description.value:nr(e.description.value);const r=Tl(e.browsers);r&&(n+=` (`+nr(r)+")"),"syntax"in e&&e.syntax&&(n+=` Syntax: ${nr(e.syntax)}`)}return e.references&&e.references.length>0&&(t==null?void 0:t.references)!==!1&&(n.length>0&&(n+=` `),n+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),n}function Tl(e=[]){return e.length===0?null:e.map(t=>{let n="";const r=t.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in zl&&(n+=zl[i]),s&&(n+=" "+s),n}).join(", ")}var up=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,pp=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:g("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:g("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:g("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:g("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:g("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:g("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:g("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:g("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:g("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:g("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:g("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:g("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:g("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:g("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:g("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:g("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:g("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:g("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:g("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:g("Mix two colors together in a polar color space.")}],mp=/^(rgb|rgba|hsl|hsla|hwb)$/i,rr={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"},fp=new RegExp(`^(${Object.keys(rr).join("|")})$`,"i"),Ai={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."},gp=new RegExp(`^(${Object.keys(Ai).join("|")})$`,"i");function mt(e,t){const r=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(t=100);const i=parseFloat(r[1])/t;if(i>=0&&i<=1)return i}throw new Error}function Ol(e){const t=e.getText(),n=t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(t)%360;case"rad":return parseFloat(t)*180/Math.PI%360;case"grad":return parseFloat(t)*.9%360;case"turn":return parseFloat(t)*360%360;default:if(typeof n[2]>"u")return parseFloat(t)%360}throw new Error}function bp(e){const t=e.getName();return t?mp.test(t):!1}function Wl(e){return up.test(e)||fp.test(e)||gp.test(e)}var Vl=48,vp=57,wp=65,ir=97,yp=102;function le(e){return e=ir&&e<=yp?e-ir+10:0)}function Ul(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:le(e.charCodeAt(1))*17/255,green:le(e.charCodeAt(2))*17/255,blue:le(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:le(e.charCodeAt(1))*17/255,green:le(e.charCodeAt(2))*17/255,blue:le(e.charCodeAt(3))*17/255,alpha:le(e.charCodeAt(4))*17/255};case 7:return{red:(le(e.charCodeAt(1))*16+le(e.charCodeAt(2)))/255,green:(le(e.charCodeAt(3))*16+le(e.charCodeAt(4)))/255,blue:(le(e.charCodeAt(5))*16+le(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(le(e.charCodeAt(1))*16+le(e.charCodeAt(2)))/255,green:(le(e.charCodeAt(3))*16+le(e.charCodeAt(4)))/255,blue:(le(e.charCodeAt(5))*16+le(e.charCodeAt(6)))/255,alpha:(le(e.charCodeAt(7))*16+le(e.charCodeAt(8)))/255}}return null}function $l(e,t,n,r=1){if(e=e/60,t===0)return{red:n,green:n,blue:n,alpha:r};{const i=(l,o,c)=>{for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(o-l)*c+l:c<3?o:c<4?(o-l)*(4-c)+l:l},s=n<=.5?n*(t+1):n+t-n*t,a=n*2-s;return{red:i(a,s,e+2),green:i(a,s,e),blue:i(a,s,e-2),alpha:r}}}function Bl(e){const t=e.red,n=e.green,r=e.blue,i=e.alpha,s=Math.max(t,n,r),a=Math.min(t,n,r);let l=0,o=0;const c=(a+s)/2,d=s-a;if(d>0){switch(o=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case t:l=(n-r)/d+(n=1){const o=t/(t+n);return{red:o,green:o,blue:o,alpha:r}}const i=$l(e,1,.5,r);let s=i.red;s*=1-t-n,s+=t;let a=i.green;a*=1-t-n,a+=t;let l=i.blue;return l*=1-t-n,l+=t,{red:s,green:a,blue:l,alpha:r}}function Sp(e){const t=Bl(e),n=Math.min(e.red,e.green,e.blue),r=1-Math.max(e.red,e.green,e.blue);return{h:t.h,w:n,b:r,a:t.a}}function Cp(e){if(e.type===b.HexColorValue){const t=e.getText();return Ul(t)}else if(e.type===b.Function){const t=e,n=t.getName();let r=t.getArguments().getChildren();if(r.length===1){const i=r[0].getChildren();if(i.length===1&&i[0].type===b.Expression&&(r=i[0].getChildren(),r.length===3)){const s=r[2];if(s instanceof di){const a=s.getLeft(),l=s.getRight(),o=s.getOperator();a&&l&&o&&o.matches("/")&&(r=[r[0],r[1],a,l])}}}if(!n||r.length<3||r.length>4)return null;try{const i=r.length===4?mt(r[3],1):1;if(n==="rgb"||n==="rgba")return{red:mt(r[0],255),green:mt(r[1],255),blue:mt(r[2],255),alpha:i};if(n==="hsl"||n==="hsla"){const s=Ol(r[0]),a=mt(r[1],100),l=mt(r[2],100);return $l(s,a,l,i)}else if(n==="hwb"){const s=Ol(r[0]),a=mt(r[1],100),l=mt(r[2],100);return xp(s,a,l,i)}}catch{return null}}else if(e.type===b.Identifier){if(e.parent&&e.parent.type!==b.Term)return null;const t=e.parent;if(t&&t.parent&&t.parent.type===b.BinaryExpression){const i=t.parent;if(i.parent&&i.parent.type===b.ListEntry&&i.parent.key===i)return null}const n=e.getText().toLowerCase();if(n==="none")return null;const r=rr[n];if(r)return Ul(r)}return null}var ql={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."},jl={"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."},Hl={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."},_p=["medium","thick","thin"],Gl={"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."},Jl={"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."},Xl={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."},Yl={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},Ql={"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."},Kl={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."},Zl={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},ec={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},kp=["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"],Ep=["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"],Fp=["@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 sr(e){return Object.keys(e).map(t=>e[t])}function De(e){return typeof e<"u"}var ar=class{constructor(e=new mn){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:p.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return p.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return p.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return p.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return e.indexOf(this.token.type)!==-1}peekRegExp(e,t){return e!==this.token.type?!1:t.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){const e=this.scanner.tryScanUnicode();return e?(this.prevToken=e,this.token=this.scanner.scan(),!0):!1}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){const t=this.mark(),n=e();return n||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(p.AtKeyword===this.token.type){for(const t of e)if(t.length===this.token.text.length&&t===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type?(this.consumeToken(),!0):!1}acceptIdent(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1}acceptKeyword(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1}acceptDelim(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1}acceptRegexp(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1}_parseRegexp(e){let t=this.createNode(b.Identifier);do;while(this.acceptRegexp(e));return this.finish(t)}acceptUnquotedString(){const e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);const t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,t){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(t&&t.indexOf(this.token.type)!==-1)return!0;if(this.token.type===p.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new T(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,n,r){if(!(e instanceof be)&&(t&&this.markError(e,t,n,r),this.prevToken)){const i=this.prevToken.offset+this.prevToken.len;e.length=i>e.offset?i-e.offset:0}return e}markError(e,t,n,r){this.token!==this.lastErrorToken&&(e.addIssue(new Wo(e,t,_e.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||r)&&this.resync(n,r)}parseStylesheet(e){const t=e.version,n=e.getText(),r=(i,s)=>{if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return n.substr(i,s)};return this.internalParse(n,this._parseStylesheet,r)}internalParse(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();const r=t.bind(this)();return r&&(n?r.textProvider=n:r.textProvider=(i,s)=>e.substr(i,s)),r}_parseStylesheet(){const e=this.create(ku);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let n=!1;do{n=!1;const r=this._parseStylesheetStatement();for(r&&(e.addChild(r),n=!0,t=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon)&&this.markError(e,x.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)n=!0,t=!1}while(n);if(this.peek(p.EOF))break;t||(this.peek(p.AtKeyword)?this.markError(e,x.UnknownAtRule):this.markError(e,x.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){const t=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){const t=this.create(Ct),n=t.getSelectors();if(!n.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!n.addChild(this._parseSelector(e)))return this.finish(t,x.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(p.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case b.Keyframe:case b.ViewPort:case b.Media:case b.Ruleset:case b.Namespace:case b.If:case b.For:case b.Each:case b.While:case b.MixinDeclaration:case b.FunctionDeclaration:case b.MixinContentDeclaration:return!1;case b.ExtendsReference:case b.MixinContentReference:case b.ReturnStatement:case b.MediaQuery:case b.Debug:case b.Import:case b.AtApplyRule:case b.CustomPropertyDeclaration:return!0;case b.VariableDeclaration:return e.needsSemicolon;case b.MixinReference:return!e.getContent();case b.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const t=this.create(si);if(!this.accept(p.CurlyL))return null;let n=e();for(;t.addChild(n)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(n)&&!this.accept(p.SemiColon))return this.finish(t,x.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(n&&this.prevToken&&this.prevToken.type===p.SemiColon&&(n.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););n=e()}return this.accept(p.CurlyR)?this.finish(t):this.finish(t,x.RightCurlyExpected,[p.CurlyR,p.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,x.LeftCurlyExpected,[p.CurlyR,p.SemiColon])}_parseSelector(e){const t=this.create(fn);let n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)n=!0,t.addChild(this._parseCombinator());return n?this.finish(t):null}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const n=this.create($e);return n.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseExpr())?(n.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):this.finish(n,x.PropertyValueExpected)):this.finish(n,x.ColonExpected,[p.Colon],e||[p.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(p.Ident,/^--/))return null;const t=this.create(Fu);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(t,x.ColonExpected,[p.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);const n=this.mark();if(this.peek(p.CurlyL)){const i=this.create(Eu),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(i.setDeclarations(s)&&!s.isErroneous(!0)&&(i.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(i),t.setPropertySet(i),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(n)}const r=this._parseExpr();return r&&!r.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],p.SemiColon,p.EOF))?(t.setValue(r),this.peek(p.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(n),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),De(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,x.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[p.CurlyR]){const t=this.create(T),n=()=>i===0&&s===0&&a===0,r=()=>e.indexOf(this.token.type)!==-1;let i=0,s=0,a=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.Exclamation:if(n())break e;break;case p.CurlyL:i++;break;case p.CurlyR:if(i--,i<0){if(r()&&s===0&&a===0)break e;return this.finish(t,x.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0){if(r()&&a===0&&i===0)break e;return this.finish(t,x.LeftParenthesisExpected)}break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(t,x.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:let l=x.RightCurlyExpected;return a>0?l=x.RightSquareBracketExpected:s>0&&(l=x.RightParenthesisExpected),this.finish(t,l)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){const t=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){const e=this.create(oi),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(p.Charset))return null;const e=this.create(T);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,x.SemiColonExpected):this.finish(e,x.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(li);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,x.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(p.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,x.IdentifierExpected,[p.SemiColon]);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(p.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(p.ParenthesisR))?this.finish(e,x.RightParenthesisExpected,[p.ParenthesisR],[]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(Wu);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,x.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,x.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(No);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;const e=this.create(Lu);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;const e=this.create(Ao),t=this.create(T);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,x.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,x.IdentifierExpected,[p.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([H.Keyframe])}_parseKeyframeSelector(){const e=this.create(Mo);let t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(p.Percentage)&&(t=!0),!t)return null;for(;this.accept(p.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(p.Percentage)&&(t=!0),!t)return this.finish(e,x.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(Mo),t=this.mark();let n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return null;for(;this.accept(p.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return this.restoreAtMark(t),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(Uu);return this.consumeToken(),!this.peekRegExp(p.Ident,/^--/)||!e.setName(this._parseIdent([H.Property]))?this.finish(e,x.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const t=this.create(Vu);this.consumeToken();const n=this._parseLayerNameList();return n&&t.setNames(n),(!n||n.getChildren().length===1)&&this.peek(p.CurlyL)?this._parseBody(t,this._parseLayerDeclaration.bind(this,e)):this.accept(p.SemiColon)?this.finish(t):this.finish(t,x.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){const e=this.createNode(b.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,x.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(b.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,x.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const t=this.create(hi);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){const e=this.create(bn);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i)){const t=this.token.text.toLowerCase();for(;this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){const e=this.create(bn);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,x.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,x.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){const t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let n=1;for(;this.token.type!==p.EOF&&n!==0;)this.token.type===p.ParenthesisL?n++:this.token.type===p.ParenthesisR&&n--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(t)}return this.finish(e,x.LeftParenthesisExpected,[],[p.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;const t=this.create(ci);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,x.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(Lo);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,x.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,x.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(zo),t=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){const e=this.mark(),t=this.create(Yu);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,x.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(qu);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[p.ParenthesisR],t=this.create(ju);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,x.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,x.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,x.TermExpected,[],e)}}else if(t.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(t,x.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,x.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,x.TermExpected,[],e)}else return this.finish(t,x.IdentifierExpected,[],e);return this.finish(t)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){const e=this.create(T);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;const e=this.create(Hu);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,x.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(p.AtKeyword))return null;const e=this.create(Gu);return this.acceptOneKeyword(Fp)||this.markError(e,x.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;const e=this.create(T);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,x.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create($u);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;const t=this.create(Bu);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(T);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){const e=this.create(T);if(this.accept(p.ParenthesisL)){if(this.peekIdent("not")||this.peek(p.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseStyleQuery(){const e=this.create(T);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(p.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([p.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(T);if(this.accept(p.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,x.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(p.AtKeyword))return null;const e=this.create(To);e.addChild(this._parseUnknownAtRuleName());const t=()=>r===0&&i===0&&s===0;let n=0,r=0,i=0,s=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(t())break e;break;case p.EOF:return r>0?this.finish(e,x.RightCurlyExpected):s>0?this.finish(e,x.RightSquareBracketExpected):i>0?this.finish(e,x.RightParenthesisExpected):this.finish(e);case p.CurlyL:n++,r++;break;case p.CurlyR:if(r--,n>0&&r===0){if(this.consumeToken(),s>0)return this.finish(e,x.RightSquareBracketExpected);if(i>0)return this.finish(e,x.RightParenthesisExpected);break e}if(r<0){if(i===0&&s===0)break e;return this.finish(e,x.LeftCurlyExpected)}break;case p.ParenthesisL:i++;break;case p.ParenthesisR:if(i--,i<0)return this.finish(e,x.LeftParenthesisExpected);break;case p.BracketL:s++;break;case p.BracketR:if(s--,s<0)return this.finish(e,x.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(T);return this.accept(p.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(b.Operator);return this.consumeToken(),this.finish(e)}else return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(T);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(T);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=b.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=b.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){const e=this.create(T);return this.consumeToken(),e.type=b.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){const e=this.create(T);return this.consumeToken(),e.type=b.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){const e=this.create(T);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=b.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){const e=this.create(qt);let t=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&t++;(t===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(b.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(b.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,x.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(b.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,x.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),t=this.createNode(b.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),!t.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(t)}_parseNamespacePrefix(){const e=this.mark(),t=this.createNode(b.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(p.BracketL))return null;const e=this.create(Xu);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,x.RightSquareBracketExpected)):this.finish(e,x.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){const t=()=>{const r=this.create(T);if(!r.addChild(this._parseSelector(!0)))return null;for(;this.accept(p.Comma)&&r.addChild(this._parseSelector(!0)););return this.peek(p.ParenthesisR)?this.finish(r):null};if(!e.addChild(this.try(t))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(t)))return this.finish(e,x.SelectorExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(p.Colon))return null;const e=this.mark(),t=this.createNode(b.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,x.IdentifierExpected):this.finish(t))}_tryParsePrio(){const e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(p.Exclamation))return null;const e=this.createNode(b.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const t=this.create(Po);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;const e=this.create(_u);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(p.BracketL))return null;const e=this.createNode(b.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,x.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let n=this.create(di);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,x.TermExpected);n=this.finish(n);const r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)}_parseTerm(){let e=this.create(Ju);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(T);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)}_parseNumeric(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.ContainerQueryLength)||this.peek(p.Freq)){const e=this.create(pi);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;const e=this.createNode(b.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),t=this.createNode(b.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(t):this.finish(t,x.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(T);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(p.Ident))return null;const t=this.create(Re);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){const e=this.mark(),t=this.create(gn);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,x.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(t):this.finish(t,x.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(p.Ident))return null;const e=this.create(Re);if(e.referenceTypes=[H.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(jt);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){const e=this.create(ui);return this.consumeToken(),this.finish(e)}else return null}};function Rp(e,t){let n=0,r=e.length;if(r===0)return 0;for(;ne+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){const n=e+t,r=Rp(this.children,s=>s.offset>n);if(r===0)return this;const i=this.children[r-1];return i.offset<=e&&i.offset+i.length>=e+t?i.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let n=0;n{var e={470:i=>{function s(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,c){for(var d,u="",f=0,m=-1,w=0,y=0;y<=o.length;++y){if(y2){var E=u.lastIndexOf("/");if(E!==u.length-1){E===-1?(u="",f=0):f=(u=u.slice(0,E)).length-1-u.lastIndexOf("/"),m=y,w=0;continue}}else if(u.length===2||u.length===1){u="",f=0,m=y,w=0;continue}}c&&(u.length>0?u+="/..":u="..",f=2)}else u.length>0?u+="/"+o.slice(m+1,y):u=o.slice(m+1,y),f=y-m-1;m=y,w=0}else d===46&&w!==-1?++w:w=-1}return u}var l={resolve:function(){for(var o,c="",d=!1,u=arguments.length-1;u>=-1&&!d;u--){var f;u>=0?f=arguments[u]:(o===void 0&&(o=process.cwd()),f=o),s(f),f.length!==0&&(c=f+"/"+c,d=f.charCodeAt(0)===47)}return c=a(c,!d),d?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(o){if(s(o),o.length===0)return".";var c=o.charCodeAt(0)===47,d=o.charCodeAt(o.length-1)===47;return(o=a(o,!c)).length!==0||c||(o="."),o.length>0&&d&&(o+="/"),c?"/"+o:o},isAbsolute:function(o){return s(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=d:o+="/"+d)}return o===void 0?".":l.normalize(o)},relative:function(o,c){if(s(o),s(c),o===c||(o=l.resolve(o))===(c=l.resolve(c)))return"";for(var d=1;dy){if(c.charCodeAt(m+R)===47)return c.slice(m+R+1);if(R===0)return c.slice(m+R)}else f>y&&(o.charCodeAt(d+R)===47?E=R:R===0&&(E=0));break}var N=o.charCodeAt(d+R);if(N!==c.charCodeAt(m+R))break;N===47&&(E=R)}var C="";for(R=d+E+1;R<=u;++R)R!==u&&o.charCodeAt(R)!==47||(C.length===0?C+="..":C+="/..");return C.length>0?C+c.slice(m+E):(m+=E,c.charCodeAt(m)===47&&++m,c.slice(m))},_makeLong:function(o){return o},dirname:function(o){if(s(o),o.length===0)return".";for(var c=o.charCodeAt(0),d=c===47,u=-1,f=!0,m=o.length-1;m>=1;--m)if((c=o.charCodeAt(m))===47){if(!f){u=m;break}}else f=!1;return u===-1?d?"/":".":d&&u===1?"//":o.slice(0,u)},basename:function(o,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(o);var d,u=0,f=-1,m=!0;if(c!==void 0&&c.length>0&&c.length<=o.length){if(c.length===o.length&&c===o)return"";var w=c.length-1,y=-1;for(d=o.length-1;d>=0;--d){var E=o.charCodeAt(d);if(E===47){if(!m){u=d+1;break}}else y===-1&&(m=!1,y=d+1),w>=0&&(E===c.charCodeAt(w)?--w==-1&&(f=d):(w=-1,f=y))}return u===f?f=y:f===-1&&(f=o.length),o.slice(u,f)}for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!m){u=d+1;break}}else f===-1&&(m=!1,f=d+1);return f===-1?"":o.slice(u,f)},extname:function(o){s(o);for(var c=-1,d=0,u=-1,f=!0,m=0,w=o.length-1;w>=0;--w){var y=o.charCodeAt(w);if(y!==47)u===-1&&(f=!1,u=w+1),y===46?c===-1?c=w:m!==1&&(m=1):c!==-1&&(m=-1);else if(!f){d=w+1;break}}return c===-1||u===-1||m===0||m===1&&c===u-1&&c===d+1?"":o.slice(c,u)},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,d){var u=d.dir||d.root,f=d.base||(d.name||"")+(d.ext||"");return u?u===d.root?u+f:u+"/"+f:f}(0,o)},parse:function(o){s(o);var c={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return c;var d,u=o.charCodeAt(0),f=u===47;f?(c.root="/",d=1):d=0;for(var m=-1,w=0,y=-1,E=!0,R=o.length-1,N=0;R>=d;--R)if((u=o.charCodeAt(R))!==47)y===-1&&(E=!1,y=R+1),u===46?m===-1?m=R:N!==1&&(N=1):m!==-1&&(N=-1);else if(!E){w=R+1;break}return m===-1||y===-1||N===0||N===1&&m===y-1&&m===w+1?y!==-1&&(c.base=c.name=w===0&&f?o.slice(1,y):o.slice(w,y)):(w===0&&f?(c.name=o.slice(1,m),c.base=o.slice(1,y)):(c.name=o.slice(w,m),c.base=o.slice(w,y)),c.ext=o.slice(m,y)),w>0?c.dir=o.slice(0,w-1):f&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>f,Utils:()=>K}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function o(_,v){if(!_.scheme&&v)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${_.authority}", path: "${_.path}", query: "${_.query}", fragment: "${_.fragment}"}`);if(_.scheme&&!s.test(_.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(_.path){if(_.authority){if(!a.test(_.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(l.test(_.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const c="",d="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(v,k,F,A,M,P=!1){bt(this,"scheme");bt(this,"authority");bt(this,"path");bt(this,"query");bt(this,"fragment");typeof v=="object"?(this.scheme=v.scheme||c,this.authority=v.authority||c,this.path=v.path||c,this.query=v.query||c,this.fragment=v.fragment||c):(this.scheme=function(Q,J){return Q||J?Q:"file"}(v,P),this.authority=k||c,this.path=function(Q,J){switch(Q){case"https":case"http":case"file":J?J[0]!==d&&(J=d+J):J=d}return J}(this.scheme,F||c),this.query=A||c,this.fragment=M||c,o(this,P))}static isUri(v){return v instanceof f||!!v&&typeof v.authority=="string"&&typeof v.fragment=="string"&&typeof v.path=="string"&&typeof v.query=="string"&&typeof v.scheme=="string"&&typeof v.fsPath=="string"&&typeof v.with=="function"&&typeof v.toString=="function"}get fsPath(){return N(this)}with(v){if(!v)return this;let{scheme:k,authority:F,path:A,query:M,fragment:P}=v;return k===void 0?k=this.scheme:k===null&&(k=c),F===void 0?F=this.authority:F===null&&(F=c),A===void 0?A=this.path:A===null&&(A=c),M===void 0?M=this.query:M===null&&(M=c),P===void 0?P=this.fragment:P===null&&(P=c),k===this.scheme&&F===this.authority&&A===this.path&&M===this.query&&P===this.fragment?this:new w(k,F,A,M,P)}static parse(v,k=!1){const F=u.exec(v);return F?new w(F[2]||c,L(F[4]||c),L(F[5]||c),L(F[7]||c),L(F[9]||c),k):new w(c,c,c,c,c)}static file(v){let k=c;if(i&&(v=v.replace(/\\/g,d)),v[0]===d&&v[1]===d){const F=v.indexOf(d,2);F===-1?(k=v.substring(2),v=d):(k=v.substring(2,F),v=v.substring(F)||d)}return new w("file",k,v,c,c)}static from(v){const k=new w(v.scheme,v.authority,v.path,v.query,v.fragment);return o(k,!0),k}toString(v=!1){return C(this,v)}toJSON(){return this}static revive(v){if(v){if(v instanceof f)return v;{const k=new w(v);return k._formatted=v.external,k._fsPath=v._sep===m?v.fsPath:null,k}}return v}}const m=i?1:void 0;class w extends f{constructor(){super(...arguments);bt(this,"_formatted",null);bt(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=N(this)),this._fsPath}toString(k=!1){return k?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=m),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k}}const y={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 E(_,v,k){let F,A=-1;for(let M=0;M<_.length;M++){const P=_.charCodeAt(M);if(P>=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===45||P===46||P===95||P===126||v&&P===47||k&&P===91||k&&P===93||k&&P===58)A!==-1&&(F+=encodeURIComponent(_.substring(A,M)),A=-1),F!==void 0&&(F+=_.charAt(M));else{F===void 0&&(F=_.substr(0,M));const Q=y[P];Q!==void 0?(A!==-1&&(F+=encodeURIComponent(_.substring(A,M)),A=-1),F+=Q):A===-1&&(A=M)}}return A!==-1&&(F+=encodeURIComponent(_.substring(A))),F!==void 0?F:_}function R(_){let v;for(let k=0;k<_.length;k++){const F=_.charCodeAt(k);F===35||F===63?(v===void 0&&(v=_.substr(0,k)),v+=y[F]):v!==void 0&&(v+=_[k])}return v!==void 0?v:_}function N(_,v){let k;return k=_.authority&&_.path.length>1&&_.scheme==="file"?`//${_.authority}${_.path}`:_.path.charCodeAt(0)===47&&(_.path.charCodeAt(1)>=65&&_.path.charCodeAt(1)<=90||_.path.charCodeAt(1)>=97&&_.path.charCodeAt(1)<=122)&&_.path.charCodeAt(2)===58?_.path[1].toLowerCase()+_.path.substr(2):_.path,i&&(k=k.replace(/\//g,"\\")),k}function C(_,v){const k=v?R:E;let F="",{scheme:A,authority:M,path:P,query:Q,fragment:J}=_;if(A&&(F+=A,F+=":"),(M||A==="file")&&(F+=d,F+=d),M){let Y=M.indexOf("@");if(Y!==-1){const Ee=M.substr(0,Y);M=M.substr(Y+1),Y=Ee.lastIndexOf(":"),Y===-1?F+=k(Ee,!1,!1):(F+=k(Ee.substr(0,Y),!1,!1),F+=":",F+=k(Ee.substr(Y+1),!1,!0)),F+="@"}M=M.toLowerCase(),Y=M.lastIndexOf(":"),Y===-1?F+=k(M,!1,!0):(F+=k(M.substr(0,Y),!1,!0),F+=M.substr(Y))}if(P){if(P.length>=3&&P.charCodeAt(0)===47&&P.charCodeAt(2)===58){const Y=P.charCodeAt(1);Y>=65&&Y<=90&&(P=`/${String.fromCharCode(Y+32)}:${P.substr(3)}`)}else if(P.length>=2&&P.charCodeAt(1)===58){const Y=P.charCodeAt(0);Y>=65&&Y<=90&&(P=`${String.fromCharCode(Y+32)}:${P.substr(2)}`)}F+=k(P,!0,!1)}return Q&&(F+="?",F+=k(Q,!1,!1)),J&&(F+="#",F+=v?J:E(J,!1,!1)),F}function I(_){try{return decodeURIComponent(_)}catch{return _.length>3?_.substr(0,3)+I(_.substr(3)):_}}const D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function L(_){return _.match(D)?_.replace(D,v=>I(v)):_}var O=n(470);const z=O.posix||O,q="/";var K;(function(_){_.joinPath=function(v,...k){return v.with({path:z.join(v.path,...k)})},_.resolvePath=function(v,...k){let F=v.path,A=!1;F[0]!==q&&(F=q+F,A=!0);let M=z.resolve(F,...k);return A&&M[0]===q&&!v.authority&&(M=M.substring(1)),v.with({path:M})},_.dirname=function(v){if(v.path.length===0||v.path===q)return v;let k=z.dirname(v.path);return k.length===1&&k.charCodeAt(0)===46&&(k=""),v.with({path:k})},_.basename=function(v){return z.basename(v.path)},_.extname=function(v){return z.extname(v.path)}})(K||(K={}))})(),rc=r})();var{URI:Li,Utils:ft}=rc;function zi(e){return ft.dirname(Li.parse(e)).toString(!0)}function Jt(e,...t){return ft.joinPath(Li.parse(e),...t).toString(!0)}var Ip=class{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){const n={items:[],isIncomplete:!1};for(const r of this.literalCompletions){const i=r.uriValue,s=Pi(i);if(s==="."||s==="..")n.isIncomplete=!0;else{const a=await this.providePathSuggestions(i,r.position,r.range,e,t);for(let l of a)n.items.push(l)}}for(const r of this.importCompletions){const i=r.pathValue,s=Pi(i);if(s==="."||s==="..")n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);e.languageId==="scss"&&a.forEach(l=>{de(l.label,"_")&&Fo(l.label,".scss")&&(l.textEdit?l.textEdit.newText=l.label.slice(1,-5):l.label=l.label.slice(1,-5))});for(let l of a)n.items.push(l)}}return n}async providePathSuggestions(e,t,n,r,i){const s=Pi(e),a=de(e,"'")||de(e,'"'),l=a?s.slice(0,t.character-(n.start.character+1)):s.slice(0,t.character-n.start.character),o=r.uri,c=a?zp(n,1,-1):n,d=Mp(l,s,c),u=l.substring(0,l.lastIndexOf("/")+1);let f=i.resolveReference(u||".",o);if(f)try{const m=[],w=await this.readDirectory(f);for(const[y,E]of w)y.charCodeAt(0)!==Ap&&(E===Sn.Directory||Jt(f,y)!==o)&&m.push(Lp(y,E===Sn.Directory,d));return m}catch{}return[]}},Ap=46;function Pi(e){return de(e,"'")||de(e,'"')?e.slice(1,-1):e}function Mp(e,t,n){let r;const i=e.lastIndexOf("/");if(i===-1)r=n;else{const s=t.slice(i+1),a=hr(n.end,-s.length),l=s.indexOf(" ");let o;l!==-1?o=hr(a,l):o=n.end,r=G.create(a,o)}return r}function Lp(e,t,n){return t?(e=e+"/",{label:cr(e),kind:V.Folder,textEdit:U.replace(n,cr(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:cr(e),kind:V.File,textEdit:U.replace(n,cr(e))}}function cr(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function hr(e,t){return ve.create(e.line,e.character+t)}function zp(e,t,n){const r=hr(e.start,t),i=hr(e.end,n);return G.create(r,i)}var Qe=ke.Snippet,ic={title:"Suggest",command:"editor.action.triggerSuggest"},qe;(function(e){e.Enums=" ",e.Normal="d",e.VendorPrefixed="x",e.Term="y",e.Variable="z"})(qe||(qe={}));var Ti=class{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new Mi(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,r,i=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,i);const s=new Ip(this.lsOptions.fileSystemProvider.readDirectory),a=this.completionParticipants;this.completionParticipants=[s].concat(a);const l=this.doComplete(e,t,n,i);try{const o=await s.computeCompletions(e,r);return{isIncomplete:l.isIncomplete||o.isIncomplete,itemDefaults:l.itemDefaults,items:o.items.concat(l.items)}}finally{this.completionParticipants=a}}doComplete(e,t,n,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=Wp(e,this.offset),this.defaultReplaceRange=G.create(ve.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=r;try{const i={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=ii(this.styleSheet,this.offset);for(let s=this.nodePath.length-1;s>=0;s--){const a=this.nodePath[s];if(a instanceof oi)this.getCompletionsForDeclarationProperty(a.getParent(),i);else if(a instanceof Po)a.parent instanceof mi?this.getVariableProposals(null,i):this.getCompletionsForExpression(a,i);else if(a instanceof qt){const l=a.findAParent(b.ExtendsReference,b.Ruleset);if(l)if(l.type===b.ExtendsReference)this.getCompletionsForExtendsReference(l,a,i);else{const o=l;this.getCompletionsForSelector(o,o&&o.isNested(),i)}}else if(a instanceof jt)this.getCompletionsForFunctionArgument(a,a.getParent(),i);else if(a instanceof si)this.getCompletionsForDeclarations(a,i);else if(a instanceof Gn)this.getCompletionsForVariableDeclaration(a,i);else if(a instanceof Ct)this.getCompletionsForRuleSet(a,i);else if(a instanceof mi)this.getCompletionsForInterpolation(a,i);else if(a instanceof Hn)this.getCompletionsForFunctionDeclaration(a,i);else if(a instanceof Jn)this.getCompletionsForMixinReference(a,i);else if(a instanceof gn)this.getCompletionsForFunctionArgument(null,a,i);else if(a instanceof hi)this.getCompletionsForSupports(a,i);else if(a instanceof bn)this.getCompletionsForSupportsCondition(a,i);else if(a instanceof vn)this.getCompletionsForExtendsReference(a,null,i);else if(a.type===b.URILiteral)this.getCompletionForUriLiteralValue(a,i);else if(a.parent===null)this.getCompletionForTopLevel(i);else if(a.type===b.StringLiteral&&this.isImportPathParent(a.parent.type))this.getCompletionForImportPath(a,i);else continue;if(i.items.length>0||this.offset>a.offset)return this.finalize(i)}return this.getCompletionsForStylesheet(i),i.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,i),this.finalize(i)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===b.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(e.indexOf(n.type)!==-1)return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){const n=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(s=>{let a,l,o=!1;e?(a=this.getCompletionRange(e.getProperty()),l=s.name,De(e.colonPosition)||(l+=": ",o=!0)):(a=this.getCompletionRange(null),l=s.name+": ",o=!0),!e&&r&&(l+="$0;"),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(a.end)&&(l+="$0;");const c={label:s.name,documentation:pt(s,this.doesSupportMarkdown()),tags:Cn(s)?[kt.Deprecated]:[],textEdit:U.replace(a,l),insertTextFormat:ke.Snippet,kind:V.Property};s.restrictions||(o=!1),n&&o&&(c.command=ic);const u=(255-(typeof s.relevance=="number"?Math.min(Math.max(s.relevance,0),99):50)).toString(16),f=de(s.name,"-")?qe.VendorPrefixed:qe.Normal;c.sortText=f+"_"+u,t.items.push(c)}),this.completionParticipants.forEach(s=>{s.onCssProperty&&s.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),t}get isTriggerPropertyValueCompletionEnabled(){var e;return((e=this.documentSettings)==null?void 0:e.triggerPropertyValueCompletion)??!0}get isCompletePropertyWithSemicolonEnabled(){var e;return((e=this.documentSettings)==null?void 0:e.completePropertyWithSemicolon)??!0}getCompletionsForDeclarationValue(e,t){const n=e.getFullPropertyName(),r=this.cssDataManager.getProperty(n);let i=e.getValue()||null;for(;i&&i.hasChildren();)i=i.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(s=>{s.onCssPropertyValue&&s.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(i)})}),r){if(r.restrictions)for(const s of r.restrictions)switch(s){case"color":this.getColorProposals(r,i,t);break;case"position":this.getPositionProposals(r,i,t);break;case"repeat":this.getRepeatStyleProposals(r,i,t);break;case"line-style":this.getLineStyleProposals(r,i,t);break;case"line-width":this.getLineWidthProposals(r,i,t);break;case"geometry-box":this.getGeometryBoxProposals(r,i,t);break;case"box":this.getBoxProposals(r,i,t);break;case"image":this.getImageProposals(r,i,t);break;case"timing-function":this.getTimingFunctionProposals(r,i,t);break;case"shape":this.getBasicShapeProposals(r,i,t);break}this.getValueEnumProposals(r,i,t),this.getCSSWideKeywordProposals(r,i,t),this.getUnitProposals(r,i,t)}else{const s=Pp(this.styleSheet,e);for(const a of s.getEntries())t.items.push({label:a,textEdit:U.replace(this.getCompletionRange(i),a),kind:V.Value})}return this.getVariableProposals(i,t),this.getTermProposals(r,i,t),t}getValueEnumProposals(e,t,n){if(e.values)for(const r of e.values){let i=r.name,s;if(Fo(i,")")){const o=i.lastIndexOf("(");o!==-1&&(i=i.substring(0,o+1)+"$1"+i.substring(o+1),s=Qe)}let a=qe.Enums;de(r.name,"-")&&(a+=qe.VendorPrefixed);const l={label:r.name,documentation:pt(r,this.doesSupportMarkdown()),tags:Cn(e)?[kt.Deprecated]:[],textEdit:U.replace(this.getCompletionRange(t),i),sortText:a,kind:V.Value,insertTextFormat:s};n.items.push(l)}return n}getCSSWideKeywordProposals(e,t,n){for(const r in Xl)n.items.push({label:r,documentation:Xl[r],textEdit:U.replace(this.getCompletionRange(t),r),kind:V.Value});for(const r in Yl){const i=Xt(r);n.items.push({label:r,documentation:Yl[r],textEdit:U.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:Qe,command:de(r,"var")?ic:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){const n=this.getSymbolContext().findSymbolsAtOffset(this.offset,H.Variable);for(const r of n){const i=de(r.name,"--")?`var(${r.name})`:r.name,s={label:r.name,documentation:r.value?Ro(r.value):r.value,textEdit:U.replace(this.getCompletionRange(e),i),kind:V.Variable,sortText:qe.Variable};if(typeof s.documentation=="string"&&Wl(s.documentation)&&(s.kind=V.Color),r.node.type===b.FunctionParameter){const a=r.node.getParent();a.type===b.MixinDeclaration&&(s.detail=g("argument from '{0}'",a.getName()))}t.items.push(s)}return t}getVariableProposalsForCSSVarFunction(e){const t=new Oi;this.styleSheet.acceptVisitor(new Op(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,H.Variable);for(const r of n){if(de(r.name,"--")){const i={label:r.name,documentation:r.value?Ro(r.value):r.value,textEdit:U.replace(this.getCompletionRange(null),r.name),kind:V.Variable};typeof i.documentation=="string"&&Wl(i.documentation)&&(i.kind=V.Color),e.items.push(i)}t.remove(r.name)}for(const r of t.getEntries())if(de(r,"--")){const i={label:r,textEdit:U.replace(this.getCompletionRange(null),r),kind:V.Variable};e.items.push(i)}return e}getUnitProposals(e,t,n){let r="0";if(this.currentWord.length>0){const i=this.currentWord.match(/^-?\d[\.\d+]*/);i&&(r=i[0],n.isIncomplete=r.length===this.currentWord.length)}else this.currentWord.length===0&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===b.Term&&(t=t.getParent()),e.restrictions)for(const i of e.restrictions){const s=ec[i];if(s)for(const a of s){const l=r+a;n.items.push({label:l,textEdit:U.replace(this.getCompletionRange(t),l),kind:V.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const t=e.end!==-1?this.textDocument.positionAt(e.end):this.position,n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return G.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(const i in rr)n.items.push({label:i,documentation:rr[i],textEdit:U.replace(this.getCompletionRange(t),i),kind:V.Color});for(const i in Ai)n.items.push({label:i,documentation:Ai[i],textEdit:U.replace(this.getCompletionRange(t),i),kind:V.Value});const r=new Oi;this.styleSheet.acceptVisitor(new Tp(r,this.offset));for(const i of r.getEntries())n.items.push({label:i,textEdit:U.replace(this.getCompletionRange(t),i),kind:V.Color});for(const i of pp)n.items.push({label:i.label,detail:i.func,documentation:i.desc,textEdit:U.replace(this.getCompletionRange(t),i.insertText),insertTextFormat:Qe,kind:V.Function});return n}getPositionProposals(e,t,n){for(const r in ql)n.items.push({label:r,documentation:ql[r],textEdit:U.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getRepeatStyleProposals(e,t,n){for(const r in jl)n.items.push({label:r,documentation:jl[r],textEdit:U.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getLineStyleProposals(e,t,n){for(const r in Hl)n.items.push({label:r,documentation:Hl[r],textEdit:U.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getLineWidthProposals(e,t,n){for(const r of _p)n.items.push({label:r,textEdit:U.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getGeometryBoxProposals(e,t,n){for(const r in Jl)n.items.push({label:r,documentation:Jl[r],textEdit:U.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getBoxProposals(e,t,n){for(const r in Gl)n.items.push({label:r,documentation:Gl[r],textEdit:U.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getImageProposals(e,t,n){for(const r in Ql){const i=Xt(r);n.items.push({label:r,documentation:Ql[r],textEdit:U.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:r!==i?Qe:void 0})}return n}getTimingFunctionProposals(e,t,n){for(const r in Kl){const i=Xt(r);n.items.push({label:r,documentation:Kl[r],textEdit:U.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:r!==i?Qe:void 0})}return n}getBasicShapeProposals(e,t,n){for(const r in Zl){const i=Xt(r);n.items.push({label:r,documentation:Zl[r],textEdit:U.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:r!==i?Qe:void 0})}return n}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof Ct?this.getCompletionsForRuleSet(t,e):t instanceof hi?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:U.replace(this.getCompletionRange(null),t.name),documentation:pt(t,this.doesSupportMarkdown()),tags:Cn(t)?[kt.Deprecated]:[],kind:V.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){const n=e.getDeclarations();return n&&n.endsWith("}")&&this.offset>=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){const r=this.findInNodePath(b.PseudoSelector,b.IdentifierSelector,b.ClassSelector,b.ElementNameSelector);if(!r&&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=G.create(ve.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(o=>{const c=Xt(o.name),d={label:o.name,textEdit:U.replace(this.getCompletionRange(r),c),documentation:pt(o,this.doesSupportMarkdown()),tags:Cn(o)?[kt.Deprecated]:[],kind:V.Function,insertTextFormat:o.name!==c?Qe:void 0};de(o.name,":-")&&(d.sortText=qe.VendorPrefixed),n.items.push(d)}),this.cssDataManager.getPseudoElements().forEach(o=>{const c=Xt(o.name),d={label:o.name,textEdit:U.replace(this.getCompletionRange(r),c),documentation:pt(o,this.doesSupportMarkdown()),tags:Cn(o)?[kt.Deprecated]:[],kind:V.Function,insertTextFormat:o.name!==c?Qe:void 0};de(o.name,"::-")&&(d.sortText=qe.VendorPrefixed),n.items.push(d)}),!t){for(const o of kp)n.items.push({label:o,textEdit:U.replace(this.getCompletionRange(r),o),kind:V.Keyword});for(const o of Ep)n.items.push({label:o,textEdit:U.replace(this.getCompletionRange(r),o),kind:V.Keyword})}const a={};a[this.currentWord]=!0;const l=this.textDocument.getText();if(this.styleSheet.accept(o=>{if(o.type===b.SimpleSelector&&o.length>0){const c=l.substr(o.offset,o.length);return c.charAt(0)==="."&&!a[c]&&(a[c]=!0,n.items.push({label:c,textEdit:U.replace(this.getCompletionRange(r),c),kind:V.Keyword})),!1}return!0}),e&&e.isNested()){const o=e.getSelectors().findFirstChildBeforeOffset(this.offset);o&&e.getSelectors().getChildren().indexOf(o)===0&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;const n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof ai){const r=n;if(!De(r.colonPosition)||this.offset<=r.colonPosition)return this.getCompletionsForDeclarationProperty(r,t);if(De(r.semicolonPosition)&&r.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const n=e.getParent();if(n instanceof jt)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;const r=e.findParent(b.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;const i=e.findChildAtOffset(this.offset,!0);return i?i instanceof pi||i instanceof Re?this.getCompletionsForDeclarationValue(r,t):t:this.getCompletionsForDeclarationValue(r,t)}getCompletionsForFunctionArgument(e,t,n){const r=t.getIdentifier();return r&&r.matches("var")&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(n),n}getCompletionsForFunctionDeclaration(e,t){const n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset{i.onCssMixinReference&&i.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),t}getTermProposals(e,t,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,H.Function);for(const i of r)i.node instanceof Hn&&n.items.push(this.makeTermProposal(i,i.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;const r=t.getChildren().map(s=>s instanceof jn?s.getName():s.getText()),i=e.name+"("+r.map((s,a)=>"${"+(a+1)+":"+s+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+r.join(", ")+")",textEdit:U.replace(this.getCompletionRange(n),i),insertTextFormat:Qe,kind:V.Function,sortText:qe.Term}}getCompletionsForSupportsCondition(e,t){const n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof $e)return!De(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof bn)return this.getCompletionsForSupportsCondition(n,t)}return De(e.lParent)&&this.offset>e.lParent&&(!De(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){const n=e.getDeclarations();if(!n||this.offset<=n.offset){const i=e.findFirstChildBeforeOffset(this.offset);return i instanceof bn?this.getCompletionsForSupportsCondition(i,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,r,i;if(e.hasChildren()){const s=e.getChild(0);n=s.getText(),r=this.position,i=this.getCompletionRange(s)}else{n="",r=this.position;const s=this.textDocument.positionAt(e.offset+4);i=G.create(s,s)}return this.completionParticipants.forEach(s=>{s.onCssURILiteralValue&&s.onCssURILiteralValue({uriValue:n,position:r,range:i})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(n=>{n.onCssImportPath&&n.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){const n=this.textDocument.getText();return e>=0&&e=0&&` \r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}var Wi=class hs{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(t){if(this.attributes){for(const n of this.attributes)if(n.name===t)return n.value}return null}addChild(t){t instanceof hs&&(t.parent=this),this.children||(this.children=[]),this.children.push(t)}append(t){if(this.attributes){const n=this.attributes[this.attributes.length-1];n.value=n.value+t}}prepend(t){if(this.attributes){const n=this.attributes[0];n.value=t+n.value}}findRoot(){let t=this;for(;t.parent&&!(t.parent instanceof Yt);)t=t.parent;return t}removeChild(t){if(this.children){const n=this.children.indexOf(t);if(n!==-1)return this.children.splice(n,1),!0}return!1}addAttr(t,n){this.attributes||(this.attributes=[]);for(const r of this.attributes)if(r.name===t){r.value+=" "+n;return}this.attributes.push({name:t,value:n})}clone(t=!0){const n=new hs;if(this.attributes){n.attributes=[];for(const r of this.attributes)n.addAttr(r.name,r.value)}if(t&&this.children){n.children=[];for(let r=0;r"),this.writeLine(t,r.join(""))}},Ke;(function(e){function t(r,i){return i+n(r)+i}e.ensure=t;function n(r){const i=r.match(/^['"](.*)["']$/);return i?i[1]:r}e.remove=n})(Ke||(Ke={}));var Ui=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function ac(e,t){let n=new Wi;for(const r of e.getChildren())switch(r.type){case b.SelectorCombinator:if(t){const l=r.getText().split("&");if(l.length===1){n.addAttr("name",l[0]);break}n=t.cloneWithParent(),l[0]&&n.findRoot().prepend(l[0]);for(let o=1;o1){const c=t.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(l[o])}}break;case b.SelectorPlaceholder:if(r.matches("@at-root"))return n;case b.ElementNameSelector:const i=r.getText();n.addAttr("name",i==="*"?"element":Ne(i));break;case b.ClassSelector:n.addAttr("class",Ne(r.getText().substring(1)));break;case b.IdentifierSelector:n.addAttr("id",Ne(r.getText().substring(1)));break;case b.MixinDeclaration:n.addAttr("class",r.getName());break;case b.PseudoSelector:n.addAttr(Ne(r.getText()),"");break;case b.AttributeSelector:const s=r,a=s.getIdentifier();if(a){const l=s.getValue(),o=s.getOperator();let c;if(l&&o)switch(Ne(o.getText())){case"|=":c=`${Ke.remove(Ne(l.getText()))}-…`;break;case"^=":c=`${Ke.remove(Ne(l.getText()))}…`;break;case"$=":c=`…${Ke.remove(Ne(l.getText()))}`;break;case"~=":c=` … ${Ke.remove(Ne(l.getText()))} … `;break;case"*=":c=`…${Ke.remove(Ne(l.getText()))}…`;break;default:c=Ke.remove(Ne(l.getText()));break}n.addAttr(Ne(a.getText()),c)}break}return n}function Ne(e){const t=new mn;t.setSource(e);const n=t.scanUnquotedString();return n?n.text:e}var Vp=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){const n=Bp(e);if(n){const r=new sc('"').print(n,t);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]}simpleSelectorToMarkedString(e){const t=ac(e),n=new sc('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}isPseudoElementIdentifier(e){const t=e.match(/^::?([\w-]+)/);return t?!!this.cssDataManager.getPseudoElement("::"+t[1]):!1}selectorToSpecificityMarkedString(e){const t=i=>{const s=new Ui;let a=new Ui;for(const l of i)for(const o of l.getChildren()){const c=n(o);if(c.id>a.id){a=c;continue}else if(c.ida.attr){a=c;continue}else if(c.attra.tag){a=c;continue}}return s.id+=a.id,s.attr+=a.attr,s.tag+=a.tag,s},n=i=>{const s=new Ui;e:for(const a of i.getChildren()){switch(a.type){case b.IdentifierSelector:s.id++;break;case b.ClassSelector:case b.AttributeSelector:s.attr++;break;case b.ElementNameSelector:if(a.matches("*"))break;s.tag++;break;case b.PseudoSelector:const l=a.getText(),o=a.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&o.length>0){s.tag++;let c=t(o);s.id+=c.id,s.attr+=c.attr,s.tag+=c.tag;continue e}s.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&o.length>0){let c=t(o);s.id+=c.id,s.attr+=c.attr,s.tag+=c.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&o.length>0){s.attr++;let c=t(o);s.id+=c.id,s.attr+=c.attr,s.tag+=c.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&o.length>0){if(s.attr++,o.length===3&&o[1].type===23){let m=t(o[2].getChildren());s.id+=m.id,s.attr+=m.attr,s.tag+=m.tag;continue e}const c=new ar,d=o[1].getText();c.scanner.setSource(d);const u=c.scanner.scan(),f=c.scanner.scan();if(u.text==="n"||u.text==="-n"&&f.text==="of"){const m=[],y=d.slice(f.offset+2).split(",");for(const R of y){const N=c.internalParse(R,c._parseSelector);N&&m.push(N)}let E=t(m);s.id+=E.id,s.attr+=E.attr,s.tag+=E.tag;continue e}continue e}s.attr++;continue e}if(a.getChildren().length>0){const l=n(a);s.id+=l.id,s.attr+=l.attr,s.tag+=l.tag}}return s},r=n(e);return`[${g("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${r.id}, ${r.attr}, ${r.tag})`}},Up=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Yt)&&e.getChildren().some(n=>n.hasChildren()&&n.getChild(0).type===b.SelectorCombinator)){const n=this.element.findRoot();n.parent instanceof Yt&&(t=this.element,this.element=n.parent,this.element.removeChild(n),this.prev=null)}for(const n of e.getChildren()){if(n instanceof qt){if(this.prev instanceof qt){const s=new Vi("…");this.element.addChild(s),this.element=s}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new Vi("⋮"));const r=ac(n,t),i=r.findRoot();this.element.addChild(i),this.element=r}(n instanceof qt||n.type===b.SelectorCombinatorParent||n.type===b.SelectorCombinatorShadowPiercingDescendant||n.type===b.SelectorCombinatorSibling||n.type===b.SelectorCombinatorAllSiblings)&&(this.prev=n)}}};function $p(e){switch(e.type){case b.MixinDeclaration:case b.Stylesheet:return!0}return!1}function Bp(e){if(e.matches("@at-root"))return null;const t=new Yt,n=[],r=e.getParent();if(r instanceof Ct){let s=r.getParent();for(;s&&!$p(s);){if(s instanceof Ct){if(s.getSelectors().matches("@at-root"))break;n.push(s)}s=s.getParent()}}const i=new Up(t);for(let s=n.length-1;s>=0;s--){const a=n[s].getSelectors().getChild(0);a&&i.processSelector(a)}return i.processSelector(e),t}var $i=class{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new Vp(t)}configure(e){this.defaultSettings=e}doHover(e,t,n,r=this.defaultSettings){function i(c){return G.create(e.positionAt(c.offset),e.positionAt(c.end))}const s=e.offsetAt(t),a=ii(n,s);let l=null,o;for(let c=0;ctypeof t=="string"?t:t.value):e.value}doesSupportMarkdown(){if(!De(this.supportsMarkdown)){if(!De(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&e.contentFormat.indexOf(Be.Markdown)!==-1}return this.supportsMarkdown}},oc=/^\w+:\/\//,lc=/^data:/,Bi=class{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,n){const r=new Mi(n),i=e.offsetAt(t),s=ri(n,i);if(!s)return null;const a=r.findSymbolFromNode(s);return a?{uri:e.uri,range:Ze(a.node,e)}:null}findReferences(e,t,n){return this.findDocumentHighlights(e,t,n).map(i=>({uri:e.uri,range:i.range}))}getHighlightNode(e,t,n){const r=e.offsetAt(t);let i=ri(n,r);if(!(!i||i.type===b.Stylesheet||i.type===b.Declarations))return i.type===b.Identifier&&i.parent&&i.parent.type===b.ClassSelector&&(i=i.parent),i}findDocumentHighlights(e,t,n){const r=[],i=this.getHighlightNode(e,t,n);if(!i)return r;const s=new Mi(n),a=s.findSymbolFromNode(i),l=i.getText();return n.accept(o=>{if(a){if(s.matchesSymbol(o,a))return r.push({kind:hc(o),range:Ze(o,e)}),!1}else i&&i.type===o.type&&o.matches(l)&&r.push({kind:hc(o),range:Ze(o,e)});return!0}),r}isRawStringDocumentLinkNode(e){return e.type===b.Import}findDocumentLinks(e,t,n){const r=this.findUnresolvedLinks(e,t),i=[];for(let s of r){const a=s.link,l=a.target;if(!(!l||lc.test(l)))if(oc.test(l))i.push(a);else{const o=n.resolveReference(l,e.uri);o&&(a.target=o),i.push(a)}}return i}async findDocumentLinks2(e,t,n){const r=this.findUnresolvedLinks(e,t),i=[];for(let s of r){const a=s.link,l=a.target;if(!(!l||lc.test(l)))if(oc.test(l))i.push(a);else{const o=await this.resolveReference(l,e.uri,n,s.isRawLink);o!==void 0&&(a.target=o,i.push(a))}}return i}findUnresolvedLinks(e,t){const n=[],r=i=>{let s=i.getText();const a=Ze(i,e);if(a.start.line===a.end.line&&a.start.character===a.end.character)return;(de(s,"'")||de(s,'"'))&&(s=s.slice(1,-1));const l=i.parent?this.isRawStringDocumentLinkNode(i.parent):!1;n.push({link:{target:s,range:a},isRawLink:l})};return t.accept(i=>{if(i.type===b.URILiteral){const s=i.getChild(0);return s&&r(s),!1}if(i.parent&&this.isRawStringDocumentLinkNode(i.parent)){const s=i.getText();return(de(s,"'")||de(s,'"'))&&r(i),!1}return!0}),n}findSymbolInformations(e,t){const n=[],r=(i,s,a)=>{const l=a instanceof T?Ze(a,e):a,o={name:i||g(""),kind:s,location:yn.create(e.uri,l)};n.push(o)};return this.collectDocumentSymbols(e,t,r),n}findDocumentSymbols(e,t){const n=[],r=[],i=(s,a,l,o,c)=>{const d=l instanceof T?Ze(l,e):l;let u=o instanceof T?Ze(o,e):o;(!u||!cc(d,u))&&(u=G.create(d.start,d.start));const f={name:s||g(""),kind:a,range:d,selectionRange:u};let m=r.pop();for(;m&&!cc(m[1],d);)m=r.pop();if(m){const w=m[0];w.children||(w.children=[]),w.children.push(f),r.push(m)}else n.push(f);c&&r.push([f,Ze(c,e)])};return this.collectDocumentSymbols(e,t,i),n}collectDocumentSymbols(e,t,n){t.accept(r=>{if(r instanceof Ct){for(const i of r.getSelectors().getChildren())if(i instanceof fn){const s=G.create(e.positionAt(i.offset),e.positionAt(r.end));n(i.getText(),Ye.Class,s,i,r.getDeclarations())}}else if(r instanceof Gn)n(r.getName(),Ye.Variable,r,r.getVariable(),void 0);else if(r instanceof wn)n(r.getName(),Ye.Method,r,r.getIdentifier(),r.getDeclarations());else if(r instanceof Hn)n(r.getName(),Ye.Function,r,r.getIdentifier(),r.getDeclarations());else if(r instanceof Ao){const i=g("@keyframes {0}",r.getName());n(i,Ye.Class,r,r.getIdentifier(),r.getDeclarations())}else if(r instanceof No){const i=g("@font-face");n(i,Ye.Class,r,void 0,r.getDeclarations())}else if(r instanceof ci){const i=r.getChild(0);if(i instanceof Lo){const s="@media "+i.getText();n(s,Ye.Module,r,i,r.getDeclarations())}}return!0})}findDocumentColors(e,t){const n=[];return t.accept(r=>{const i=qp(r,e);return i&&n.push(i),!0}),n}getColorPresentations(e,t,n,r){const i=[],s=Math.round(n.red*255),a=Math.round(n.green*255),l=Math.round(n.blue*255);let o;n.alpha===1?o=`rgb(${s}, ${a}, ${l})`:o=`rgba(${s}, ${a}, ${l}, ${n.alpha})`,i.push({label:o,textEdit:U.replace(r,o)}),n.alpha===1?o=`#${Et(s)}${Et(a)}${Et(l)}`:o=`#${Et(s)}${Et(a)}${Et(l)}${Et(Math.round(n.alpha*255))}`,i.push({label:o,textEdit:U.replace(r,o)});const c=Bl(n);c.a===1?o=`hsl(${c.h}, ${Math.round(c.s*100)}%, ${Math.round(c.l*100)}%)`:o=`hsla(${c.h}, ${Math.round(c.s*100)}%, ${Math.round(c.l*100)}%, ${c.a})`,i.push({label:o,textEdit:U.replace(r,o)});const d=Sp(n);return d.a===1?o=`hwb(${d.h} ${Math.round(d.w*100)}% ${Math.round(d.b*100)}%)`:o=`hwb(${d.h} ${Math.round(d.w*100)}% ${Math.round(d.b*100)}% / ${d.a})`,i.push({label:o,textEdit:U.replace(r,o)}),i}prepareRename(e,t,n){const r=this.getHighlightNode(e,t,n);if(r)return G.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,t,n,r){const s=this.findDocumentHighlights(e,t,r).map(a=>U.replace(a.range,n));return{changes:{[e.uri]:s}}}async resolveModuleReference(e,t,n){if(de(t,"file://")){const r=jp(e);if(r&&r!=="."&&r!==".."){const i=n.resolveReference("/",t),s=zi(t),a=await this.resolvePathToModule(r,s,i);if(a){const l=e.substring(r.length+1);return Jt(a,l)}}}}async mapReference(e,t){return e}async resolveReference(e,t,n,r=!1,i=this.defaultSettings){if(e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,n),r);const s=await this.mapReference(n.resolveReference(e,t),r);if(this.resolveModuleReferences){if(s&&await this.fileExists(s))return s;const a=await this.mapReference(await this.resolveModuleReference(e,t,n),r);if(a)return a}if(s&&!await this.fileExists(s)){const a=n.resolveReference("/",t);if(i&&a){if(e in i)return this.mapReference(Jt(a,i[e]),r);const l=e.indexOf("/"),o=`${e.substring(0,l)}/`;if(o in i){const c=i[o].slice(0,-1);let d=Jt(a,c);return this.mapReference(d=Jt(d,e.substring(o.length-1)),r)}}}return s}async resolvePathToModule(e,t,n){const r=Jt(t,"node_modules",e,"package.json");if(await this.fileExists(r))return zi(r);if(n&&t.startsWith(n)&&t.length!==n.length)return this.resolvePathToModule(e,zi(t),n)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const t=await this.fileSystemProvider.stat(e);return!(t.type===Sn.Unknown&&t.size===-1)}catch{return!1}}};function qp(e,t){const n=Cp(e);if(n){const r=Ze(e,t);return{color:n,range:r}}return null}function Ze(e,t){return G.create(t.positionAt(e.offset),t.positionAt(e.end))}function cc(e,t){const n=t.start.line,r=t.end.line,i=e.start.line,s=e.end.line;return!(ns||r>s||n===i&&t.start.charactere.end.character)}function hc(e){if(e.type===b.Selector||e instanceof Re&&e.parent&&e.parent instanceof oi&&e.isCustomProperty)return Gt.Write;if(e.parent)switch(e.parent.type){case b.FunctionDeclaration:case b.MixinDeclaration:case b.Keyframe:case b.VariableDeclaration:case b.FunctionParameter:return Gt.Write}return Gt.Read}function Et(e){const t=e.toString(16);return t.length!==2?"0"+t:t}function jp(e){const t=e.indexOf("/");if(t===-1)return"";if(e[0]==="@"){const n=e.indexOf("/",t+1);return n===-1?e:e.substring(0,n)}return e.substring(0,t)}var Qt=_e.Warning,dc=_e.Error,Pe=_e.Ignore,pe=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},Hp=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},Z={AllVendorPrefixes:new pe("compatibleVendorPrefixes",g("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Pe),IncludeStandardPropertyWhenUsingVendorPrefix:new pe("vendorPrefix",g("When using a vendor-specific prefix also include the standard property"),Qt),DuplicateDeclarations:new pe("duplicateProperties",g("Do not use duplicate style definitions"),Pe),EmptyRuleSet:new pe("emptyRules",g("Do not use empty rulesets"),Qt),ImportStatemement:new pe("importStatement",g("Import statements do not load in parallel"),Pe),BewareOfBoxModelSize:new pe("boxModel",g("Do not use width or height when using padding or border"),Pe),UniversalSelector:new pe("universalSelector",g("The universal selector (*) is known to be slow"),Pe),ZeroWithUnit:new pe("zeroUnits",g("No unit for zero needed"),Pe),RequiredPropertiesForFontFace:new pe("fontFaceProperties",g("@font-face rule must define 'src' and 'font-family' properties"),Qt),HexColorLength:new pe("hexColorLength",g("Hex colors must consist of three, four, six or eight hex numbers"),dc),ArgsInColorFunction:new pe("argumentsInColorFunction",g("Invalid number of parameters"),dc),UnknownProperty:new pe("unknownProperties",g("Unknown property."),Qt),UnknownAtRules:new pe("unknownAtRules",g("Unknown at-rule."),Qt),IEStarHack:new pe("ieHack",g("IE hacks are only necessary when supporting IE7 and older"),Pe),UnknownVendorSpecificProperty:new pe("unknownVendorSpecificProperties",g("Unknown vendor specific property."),Pe),PropertyIgnoredDueToDisplay:new pe("propertyIgnoredDueToDisplay",g("Property is ignored due to the display."),Qt),AvoidImportant:new pe("important",g("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Pe),AvoidFloat:new pe("float",g("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Pe),AvoidIdSelector:new pe("idSelector",g("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Pe)},Gp={ValidProperties:new Hp("validProperties",g("A list of properties that are not validated against the `unknownProperties` rule."),[])},Jp=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const t=Xp(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}};function Xp(e){switch(e){case"ignore":return _e.Ignore;case"warning":return _e.Warning;case"error":return _e.Error}return null}var qi=class{constructor(e){this.cssDataManager=e}doCodeActions(e,t,n,r){return this.doCodeActions2(e,t,n,r).map(i=>{const s=i.edit&&i.edit.documentChanges&&i.edit.documentChanges[0];return _t.create(i.title,"_css.applyCodeAction",e.uri,e.version,s&&s.edits)})}doCodeActions2(e,t,n,r){const i=[];if(n.diagnostics)for(const s of n.diagnostics)this.appendFixesForMarker(e,r,s,i);return i}getFixesForUnknownProperty(e,t,n,r){const i=t.getName(),s=[];this.cssDataManager.getProperties().forEach(l=>{const o=xu(i,l.name);o>=i.length/2&&s.push({property:l.name,score:o})}),s.sort((l,o)=>o.score-l.score||l.property.localeCompare(o.property));let a=3;for(const l of s){const o=l.property,c=g("Rename to '{0}'",o),d=U.replace(n.range,o),u=_i.create(e.uri,e.version),f={documentChanges:[Kn.create(u,[d])]},m=Fi.create(c,f,Ei.QuickFix);if(m.diagnostics=[n],r.push(m),--a<=0)return}}appendFixesForMarker(e,t,n,r){if(n.code!==Z.UnknownProperty.id)return;const i=e.offsetAt(n.range.start),s=e.offsetAt(n.range.end),a=ii(t,i);for(let l=a.length-1;l>=0;l--){const o=a[l];if(o instanceof $e){const c=o.getProperty();if(c&&c.offset===i&&c.end===s){this.getFixesForUnknownProperty(e,c,n,r);return}}}}},Yp=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function _n(e,t,n,r){const i=e[t];i.value=n,n&&(tc(i.properties,r)||i.properties.push(r))}function Qp(e,t,n){_n(e,"top",t,n),_n(e,"right",t,n),_n(e,"bottom",t,n),_n(e,"left",t,n)}function ge(e,t,n,r){t==="top"||t==="right"||t==="bottom"||t==="left"?_n(e,t,n,r):Qp(e,n,r)}function ji(e,t,n){switch(t.length){case 1:ge(e,void 0,t[0],n);break;case 2:ge(e,"top",t[0],n),ge(e,"bottom",t[0],n),ge(e,"right",t[1],n),ge(e,"left",t[1],n);break;case 3:ge(e,"top",t[0],n),ge(e,"right",t[1],n),ge(e,"left",t[1],n),ge(e,"bottom",t[2],n);break;case 4:ge(e,"top",t[0],n),ge(e,"right",t[1],n),ge(e,"bottom",t[2],n),ge(e,"left",t[3],n);break}}function Hi(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function kn(e,t=!0){return t&&Hi(e,["initial","unset"])?!1:parseFloat(e.getText())!==0}function uc(e,t=!0){return e.map(n=>kn(n,t))}function dr(e,t=!0){return!(Hi(e,["none","hidden"])||t&&Hi(e,["initial","unset"]))}function Kp(e,t=!0){return e.map(n=>dr(n,t))}function Zp(e){const t=e.getChildren();if(t.length===1){const n=t[0];return kn(n)&&dr(n)}for(const n of t){const r=n;if(!kn(r,!1)||!dr(r,!1))return!1}return!0}function em(e){const t={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(const n of e){const r=n.node.value;if(!(typeof r>"u"))switch(n.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":t.width=n;break;case"height":t.height=n;break;default:const i=n.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:ge(t,i[1],Zp(r),n);break;case"width":ge(t,i[1],kn(r,!1),n);break;case"style":ge(t,i[1],dr(r,!0),n);break}break;case"width":ji(t,uc(r.getChildren(),!1),n);break;case"style":ji(t,Kp(r.getChildren(),!0),n);break}break;case"padding":i.length===1?ji(t,uc(r.getChildren(),!0),n):ge(t,i[1],kn(r,!0),n);break}break}}return t}var pc=class{constructor(){this.data={}}add(e,t,n){let r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(t),n&&r.nodes.push(n)}},mc=class gr{static entries(t,n,r,i,s){const a=new gr(n,r,i);return t.acceptVisitor(a),a.completeValidations(),a.getEntries(s)}constructor(t,n,r){this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=t.getText(),this.keyframes=new pc,this.validProperties={};const i=n.getSetting(Gp.ValidProperties);Array.isArray(i)&&i.forEach(s=>{if(typeof s=="string"){const a=s.trim().toLowerCase();a.length&&(this.validProperties[a]=!0)}})}isValidPropertyDeclaration(t){const n=t.fullPropertyName;return this.validProperties[n]}fetch(t,n){const r=[];for(const i of t)i.fullPropertyName===n&&r.push(i);return r}fetchWithValue(t,n,r){const i=[];for(const s of t)if(s.fullPropertyName===n){const a=s.node.getValue();a&&this.findValueInExpression(a,r)&&i.push(s)}return i}findValueInExpression(t,n){let r=!1;return t.accept(i=>(i.type===b.Identifier&&i.matches(n)&&(r=!0),!r)),r}getEntries(t=_e.Warning|_e.Error){return this.warnings.filter(n=>(n.getLevel()&t)!==0)}addEntry(t,n,r){const i=new Wo(t,n,this.settings.getRule(n),r);this.warnings.push(i)}getMissingNames(t,n){const r=t.slice(0);for(let s=0;s0){const o=this.fetch(r,"float");for(let c=0;c0){const o=this.fetch(r,"vertical-align");for(let c=0;c1)for(let f=0;fD.startsWith(I))&&w.delete(N)}}const y=[];for(let R=0,N=gr.prefixes.length;Rs instanceof di?(i+=1,!1):!0),i!==r&&this.addEntry(t,Z.ArgsInColorFunction)),!0}};mc.prefixes=["-ms-","-moz-","-o-","-webkit-"];var Gi=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,n=this.settings){if(n&&n.validate===!1)return[];const r=[];r.push.apply(r,sp.entries(t)),r.push.apply(r,mc.entries(t,e,new Jp(n&&n.lint),this.cssDataManager));const i=[];for(const a in Z)i.push(Z[a].id);function s(a){const l=G.create(e.positionAt(a.getOffset()),e.positionAt(a.getOffset()+a.getLength())),o=e.languageId;return{code:a.getRule().id,source:o,message:a.getMessage(),severity:a.getLevel()===_e.Warning?Yn.Warning:Yn.Error,range:l}}return r.filter(a=>a.getLevel()!==_e.Ignore).map(s)}},fc=47,tm=10,nm=13,rm=12,im=36,sm=35,am=123,En=61,om=33,lm=60,cm=62,Ji=46,et=p.CustomToken,Xi=et++,ur=et++;et++;var gc=et++,bc=et++,Yi=et++,Qi=et++,pr=et++;et++;var vc=class extends mn{scanNext(e){if(this.stream.advanceIfChar(im)){const t=["$"];if(this.ident(t))return this.finishToken(e,Xi,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([sm,am])?this.finishToken(e,ur):this.stream.advanceIfChars([En,En])?this.finishToken(e,gc):this.stream.advanceIfChars([om,En])?this.finishToken(e,bc):this.stream.advanceIfChar(lm)?this.stream.advanceIfChar(En)?this.finishToken(e,Qi):this.finishToken(e,p.Delim):this.stream.advanceIfChar(cm)?this.stream.advanceIfChar(En)?this.finishToken(e,Yi):this.finishToken(e,p.Delim):this.stream.advanceIfChars([Ji,Ji,Ji])?this.finishToken(e,pr):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([fc,fc])?(this.stream.advanceWhileChar(e=>{switch(e){case tm:case nm:case rm:return!1;default:return!0}}),!0):!1}},Ki=class{constructor(e,t){this.id=e,this.message=t}},Zi={FromExpected:new Ki("scss-fromexpected",g("'from' expected")),ThroughOrToExpected:new Ki("scss-throughexpected",g("'through' or 'to' expected")),InExpected:new Ki("scss-fromexpected",g("'in' expected"))},hm=class extends ar{constructor(){super(new vc)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(li);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,x.URIOrStringExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,x.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Xi))return null;const t=this.create(Gn);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(p.Colon))return this.finish(t,x.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,x.VariableValueExpected,[],e);for(;this.peek(p.Exclamation);)if(!t.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(p.Ident,/^(default|global)$/))return this.finish(t,x.UnknownKeyword);this.consumeToken()}return this.peek(p.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Qi)||this.accept(Yi)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(Xi))return null;const e=this.create(fi);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),t=this.create(Oo);return t.setIdentifier(this._parseIdent([H.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,x.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(p.Ident)&&!this.peek(ur)&&!this.peekDelim("-"))return null;const t=this.create(Re);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(p.Ident,/^--/);let n=!1;const r=()=>{const i=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(i),null):this._parseInterpolation()};for(;(this.accept(p.Ident)||t.addChild(r())||n&&this.acceptRegexp(/^[\w-]/))&&(n=!0,!this.hasWhitespace()););return n?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(ur)){const e=this.create(mi);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(p.CurlyR)?this.finish(e):this.finish(e,x.ExpressionExpected):this.accept(p.CurlyR)?this.finish(e):this.finish(e,x.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(gc)||this.peek(bc)||this.peek(Yi)||this.peek(Qi)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(b.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(T);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(p.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)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const n=this.create($e);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,x.ColonExpected,[p.Colon],e||[p.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);let r=!1;if(n.setValue(this._parseExpr())&&(r=!0,n.addChild(this._parsePrio())),this.peek(p.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!r)return this.finish(n,x.PropertyValueExpected);return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseNestedProperties(){const e=this.create(Io);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(vn);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,x.SelectorExpected);for(;this.accept(p.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,x.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(b.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(b.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword("@at-root")){const e=this.createNode(b.SelectorPlaceholder);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,x.IdentifierExpected);if(!this.accept(p.Colon))return this.finish(e,x.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,x.IdentifierExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):t}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;const e=this.createNode(b.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(p.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){const t=this.create(Du);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,x.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(p.CurlyL)){const n=this.create(Mu);this._parseBody(n,e),t.setElseClause(n)}}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const t=this.create(Nu);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(t,Zi.ThroughOrToExpected,[p.CurlyR]):t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,x.ExpressionExpected,[p.CurlyR]):this.finish(t,x.ExpressionExpected,[p.CurlyR]):this.finish(t,Zi.FromExpected,[p.CurlyR]):this.finish(t,x.VariableNameExpected,[p.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const t=this.create(Iu);this.consumeToken();const n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,x.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,x.VariableNameExpected,[p.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,x.ExpressionExpected,[p.CurlyR]):this.finish(t,Zi.InExpected,[p.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const t=this.create(Au);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,x.ExpressionExpected,[p.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;const e=this.create(Hn);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([H.Function])))return this.finish(e,x.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,x.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,x.RightParenthesisExpected,[p.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(b.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,x.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(wn);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([H.Mixin])))return this.finish(e,x.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,x.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(jn);return e.setIdentifier(this._parseVariable())?(this.accept(pr),this.accept(p.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,x.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(ep);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,x.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(Jn);this.consumeToken();const t=this._parseIdent([H.Mixin]);if(!e.setIdentifier(t))return this.finish(e,x.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const n=this._parseIdent([H.Mixin]);if(!n)return this.finish(e,x.IdentifierExpected,[p.CurlyR]);const r=this.create(Oo);t.referenceTypes=[H.Module],r.setIdentifier(t),e.setIdentifier(n),e.addChild(r)}if(this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,x.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(tp);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,x.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(jt),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(p.Colon))e.setIdentifier(n);else{if(this.accept(pr))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(pr),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const n=this.create(T);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return t}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(T);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)}_parseListElement(){const e=this.create(np),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(p.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,x.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(zu);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,x.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(e,x.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([H.Module]))&&!this.acceptDelim("*"))return this.finish(e,x.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,x.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){const e=this.create(Pu);return e.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,x.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,x.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(Tu);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,x.StringLiteralExpected);if(this.acceptIdent("as")){const t=this._parseIdent([H.Forward]);if(!e.setIdentifier(t))return this.finish(e,x.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,x.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,x.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,x.IdentifierOrVariableExpected);return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,x.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){const e=this.create(Ou);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}},tt=g("Sass documentation"),gt=class je extends Ti{constructor(t,n){super("$",t,n),wc(je.scssModuleLoaders),wc(je.scssModuleBuiltIns)}isImportPathParent(t){return t===b.Forward||t===b.Use||super.isImportPathParent(t)}getCompletionForImportPath(t,n){const r=t.getParent().type;if(r===b.Forward||r===b.Use)for(let i of je.scssModuleBuiltIns){const s={label:i.label,documentation:i.documentation,textEdit:U.replace(this.getCompletionRange(t),`'${i.label}'`),kind:V.Module};n.items.push(s)}return super.getCompletionForImportPath(t,n)}createReplaceFunction(){let t=1;return(n,r)=>"\\"+r+": ${"+t+++":"+(je.variableDefaults[r]||"")+"}"}createFunctionProposals(t,n,r,i){for(const s of t){const a=s.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),o={label:s.func.substr(0,s.func.indexOf("(")),detail:s.func,documentation:s.desc,textEdit:U.replace(this.getCompletionRange(n),a),insertTextFormat:ke.Snippet,kind:V.Function};r&&(o.sortText="z"),i.items.push(o)}return i}getCompletionsForSelector(t,n,r){return this.createFunctionProposals(je.selectorFuncs,null,!0,r),super.getCompletionsForSelector(t,n,r)}getTermProposals(t,n,r){let i=je.builtInFuncs;return t&&(i=i.filter(s=>!s.type||!t.restrictions||t.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(t,n,r)}getColorProposals(t,n,r){return this.createFunctionProposals(je.colorProposals,n,!1,r),super.getColorProposals(t,n,r)}getCompletionsForDeclarationProperty(t,n){return this.getCompletionForAtDirectives(n),this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(t,n)}getCompletionsForExtendsReference(t,n,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,H.Rule);for(const s of i){const a={label:s.name,textEdit:U.replace(this.getCompletionRange(n),s.name),kind:V.Function};r.items.push(a)}return r}getCompletionForAtDirectives(t){return t.items.push(...je.scssAtDirectives),t}getCompletionForTopLevel(t){return this.getCompletionForAtDirectives(t),this.getCompletionForModuleLoaders(t),super.getCompletionForTopLevel(t),t}getCompletionForModuleLoaders(t){return t.items.push(...je.scssModuleLoaders),t}};gt.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},gt.colorProposals=[{func:"red($color)",desc:g("Gets the red component of a color.")},{func:"green($color)",desc:g("Gets the green component of a color.")},{func:"blue($color)",desc:g("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:g("Mixes two colors together.")},{func:"hue($color)",desc:g("Gets the hue component of a color.")},{func:"saturation($color)",desc:g("Gets the saturation component of a color.")},{func:"lightness($color)",desc:g("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:g("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:g("Makes a color lighter.")},{func:"darken($color, $amount)",desc:g("Makes a color darker.")},{func:"saturate($color, $amount)",desc:g("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:g("Makes a color less saturated.")},{func:"grayscale($color)",desc:g("Converts a color to grayscale.")},{func:"complement($color)",desc:g("Returns the complement of a color.")},{func:"invert($color)",desc:g("Returns the inverse of a color.")},{func:"alpha($color)",desc:g("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:g("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:g("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:g("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:g("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:g("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:g("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:g("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:g("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:g("Converts a color into the format understood by IE filters.")}],gt.selectorFuncs=[{func:"selector-nest($selectors…)",desc:g("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:g("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:g("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:g("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:g("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:g("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:g("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:g("Parses a selector into the format returned by &.")}],gt.builtInFuncs=[{func:"unquote($string)",desc:g("Removes quotes from a string.")},{func:"quote($string)",desc:g("Adds quotes to a string.")},{func:"str-length($string)",desc:g("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:g("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:g("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:g("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:g("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:g("Converts a string to lower case.")},{func:"percentage($number)",desc:g("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:g("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:g("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:g("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:g("Returns the absolute value of a number.")},{func:"min($numbers)",desc:g("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:g("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:g("Returns a random number.")},{func:"length($list)",desc:g("Returns the length of a list.")},{func:"nth($list, $n)",desc:g("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:g("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:g("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:g("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:g("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:g("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:g("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:g("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:g("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:g("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:g("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:g("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:g("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:g("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:g("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:g("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:g("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:g("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:g("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:g("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:g("Returns the type of a value.")},{func:"unit($number)",desc:g("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:g("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:g("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:g("Dynamically calls a Sass function.")}],gt.scssAtDirectives=[{label:"@extend",documentation:g("Inherits the styles of another selector."),kind:V.Keyword},{label:"@at-root",documentation:g("Causes one or more rules to be emitted at the root of the document."),kind:V.Keyword},{label:"@debug",documentation:g("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:V.Keyword},{label:"@warn",documentation:g("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:V.Keyword},{label:"@error",documentation:g("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:V.Keyword},{label:"@if",documentation:g("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { $0 }`,insertTextFormat:ke.Snippet,kind:V.Keyword},{label:"@for",documentation:g("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:ke.Snippet,kind:V.Keyword},{label:"@each",documentation:g("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:ke.Snippet,kind:V.Keyword},{label:"@while",documentation:g("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { $0 }`,insertTextFormat:ke.Snippet,kind:V.Keyword},{label:"@mixin",documentation:g("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { $0 }`,insertTextFormat:ke.Snippet,kind:V.Keyword},{label:"@include",documentation:g("Includes the styles defined by another mixin into the current rule."),kind:V.Keyword},{label:"@function",documentation:g("Defines complex operations that can be re-used throughout stylesheets."),kind:V.Keyword}],gt.scssModuleLoaders=[{label:"@use",documentation:g("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:tt,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:ke.Snippet,kind:V.Keyword},{label:"@forward",documentation:g("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:tt,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:ke.Snippet,kind:V.Keyword}],gt.scssModuleBuiltIns=[{label:"sass:math",documentation:g("Provides functions that operate on numbers."),references:[{name:tt,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:g("Makes it easy to combine, search, or split apart strings."),references:[{name:tt,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:g("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:tt,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:g("Lets you access and modify values in lists."),references:[{name:tt,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:g("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:tt,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:g("Provides access to Sass’s powerful selector engine."),references:[{name:tt,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:g("Exposes the details of Sass’s inner workings."),references:[{name:tt,url:"https://sass-lang.com/documentation/modules/meta"}]}];function wc(e){e.forEach(t=>{if(t.documentation&&t.references&&t.references.length>0){const n=typeof t.documentation=="string"?{kind:"markdown",value:t.documentation}:{kind:"markdown",value:t.documentation.value};n.value+=` `,n.value+=t.references.map(r=>`[${r.name}](${r.url})`).join(" | "),t.documentation=n}})}var yc=47,dm=10,um=13,pm=12,es=96,ts=46,mm=p.CustomToken,ns=mm++,xc=class extends mn{scanNext(e){const t=this.escapedJavaScript();return t!==null?this.finishToken(e,t):this.stream.advanceIfChars([ts,ts,ts])?this.finishToken(e,ns):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([yc,yc])?(this.stream.advanceWhileChar(e=>{switch(e){case dm:case um:case pm:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===es?(this.stream.advance(1),this.stream.advanceWhileChar(t=>t!==es),this.stream.advanceIfChar(es)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}},fm=class extends ar{constructor(){super(new xc)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(li);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,x.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,x.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,x.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(b.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(e):this.finish(e,x.SemiColonExpected):this.finish(e,x.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const t=this.create(zo);return t.addChild(this._parseVariable())?this.finish(t):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const t=this.create(Gn),n=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,x.VariableValueExpected,[],e);t.addChild(this._parsePrio())}else return this.restoreAtMark(n),null;return this.peek(p.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let n=this.create(wn);if(n.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)n.getParameters().addChild(this._parseMixinParameter())||this.markError(n,x.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(p.CurlyL))return null;const t=this.create(re);return this._parseBody(t,this._parseDetachedRuleSetBody.bind(this)),this.finish(t)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let t=!1;for(;this.peek(p.BracketL)&&(t=!0),!!e.addChild(this._parseLookupValue());)t=!1;return!t}_parseLookupValue(){const e=this.create(T),t=this.mark();return this.accept(p.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?e:(this.restoreAtMark(t),null):(this.restoreAtMark(t),null)}_parseVariable(e=!1,t=!1){const n=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(p.AtKeyword))return null;const r=this.create(fi),i=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(i),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(i),null):!t&&this.peek(p.BracketL)&&!this._addLookupChildren(r)?(this.restoreAtMark(i),null):r}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){const e=this.createNode(b.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(b.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(e):this.finish(e,x.TermExpected)}return null}_parseOperator(){const e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(b.Operator);return this.consumeToken(),this.acceptDelim("="),e}else if(this.peekDelim("=")){const e=this.createNode(b.Operator);return this.consumeToken(),this.acceptDelim("<"),e}else if(this.peekDelim("<")){const e=this.createNode(b.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([H.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const t=this.create(fn);let n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){n=!0;const r=this.mark();if(t.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(r),t.addChild(this._parseCombinator())}return n?this.finish(t):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(b.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(b.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){const t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;const n=this.mark(),r=this.create(Re);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let i=!1;return e?r.isCustomProperty?i=r.addChild(this._parseIdent()):i=r.addChild(this._parseRegexp(t)):r.isCustomProperty?i=this._acceptInterpolatedIdent(r):i=this._acceptInterpolatedIdent(r,t),i?(!e&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(n),null)}peekInterpolatedIdent(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,t){let n=!1;const r=()=>{const s=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(s),null):this._parseInterpolation()},i=t?()=>this.acceptRegexp(t):()=>this.accept(p.Ident);for(;(i()||e.addChild(this._parseInterpolation()||this.try(r)))&&(n=!0,!this.hasWhitespace()););return n}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const t=this.createNode(b.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(t):this.finish(t,x.RightCurlyExpected):this.finish(t,x.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),t=this.create(wn);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,x.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(Re),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))e=this.create(Re),this.consumeToken();else return null;return e.referenceTypes=[H.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(p.Colon))return null;const e=this.mark(),t=this.create(vn);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;const e=this.mark(),t=this.create(vn);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(e),null):this._completeExtends(t)}_completeExtends(e){if(!this.accept(p.ParenthesisL))return this.finish(e,x.LeftParenthesisExpected);const t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,x.SelectorExpected);for(;this.accept(p.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,x.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(p.AtKeyword))return null;const e=this.mark(),t=this.create(Jn);return t.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(p.ParenthesisR)?this.finish(t):this.finish(t,x.RightParenthesisExpected)}_tryParseMixinReference(e=!0){const t=this.mark(),n=this.create(Jn);let r=this._parseMixinDeclarationIdentifier();for(;r;){this.acceptDelim(">");const s=this._parseMixinDeclarationIdentifier();if(s)n.getNamespaces().addChild(r),r=s;else break}if(!n.setIdentifier(r))return this.restoreAtMark(t),null;let i=!1;if(this.accept(p.ParenthesisL)){if(i=!0,n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,x.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,x.RightParenthesisExpected);r.referenceTypes=[H.Mixin]}else r.referenceTypes=[H.Mixin,H.Rule];return this.peek(p.BracketL)?e||this._addLookupChildren(n):n.addChild(this._parsePrio()),!i&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(t),null):this.finish(n)}_parseMixinArgument(){const e=this.create(jt),t=this.mark(),n=this._parseVariable();return n&&(this.accept(p.Colon)?e.setIdentifier(n):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)}_parseMixinParameter(){const e=this.create(jn);if(this.peekKeyword("@rest")){const n=this.create(T);return this.consumeToken(),this.accept(ns)?(e.setIdentifier(this.finish(n)),this.finish(e)):this.finish(e,x.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(ns)){const n=this.create(T);return this.consumeToken(),e.setIdentifier(this.finish(n)),this.finish(e)}let t=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),t=!0),!e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!t?null:this.finish(e)}_parseGuard(){if(!this.peekIdent("when"))return null;const e=this.create(rp);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,x.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,x.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(ip);return e.isNegated=this.acceptIdent("not"),this.accept(p.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,x.RightParenthesisExpected)):e.isNegated?this.finish(e,x.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),t=this.create(gn);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,x.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(t):this.finish(t,x.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(Re);return e.referenceTypes=[H.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const n=this.create(T);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return t}},rs=class ds extends Ti{constructor(t,n){super("@",t,n)}createFunctionProposals(t,n,r,i){for(const s of t){const a={label:s.name,detail:s.example,documentation:s.description,textEdit:U.replace(this.getCompletionRange(n),s.name+"($0)"),insertTextFormat:ke.Snippet,kind:V.Function};r&&(a.sortText="z"),i.items.push(a)}return i}getTermProposals(t,n,r){let i=ds.builtInProposals;return t&&(i=i.filter(s=>!s.type||!t.restrictions||t.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(t,n,r)}getColorProposals(t,n,r){return this.createFunctionProposals(ds.colorProposals,n,!1,r),super.getColorProposals(t,n,r)}getCompletionsForDeclarationProperty(t,n){return this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(t,n)}};rs.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:g("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:g('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:g("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:g("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:g("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:g("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:g("URL encodes a string")},{name:"e",example:"e(@string);",description:g("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:g("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:g("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:g("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:g("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:g("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:g("absolute value of a number"),example:"abs(number);"},{name:"acos",description:g("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:g("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:g("rounds up to an integer")},{name:"cos",description:g("cosine function"),example:"cos(number);"},{name:"floor",description:g("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:g("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:g("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:g("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:g("sine function"),example:"sin(number);"},{name:"tan",description:g("tangent function"),example:"tan(number);"},{name:"atan",description:g("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:g("returns pi"),example:"pi();"},{name:"pow",description:g("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:g("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:g("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:g("returns the lowest of one or more values"),example:"max(@x, @y);"}],rs.colorProposals=[{name:"argb",example:"argb(@color);",description:g("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:g("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:g("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:g("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:g("creates a color")},{name:"hue",example:"hue(@color);",description:g("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:g("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:g("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:g("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:g("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:g("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:g("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:g("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:g("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:g("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:g("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:g("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:g("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:g("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:g("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:g("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:g("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:g("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:g("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:g("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:g("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:g("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);"}];function gm(e,t){const n=bm(e);return vm(n,t)}function bm(e){function t(d){return e.positionAt(d.offset).line}function n(d){return e.positionAt(d.offset+d.len).line}function r(){switch(e.languageId){case"scss":return new vc;case"less":return new xc;default:return new mn}}function i(d,u){const f=t(d),m=n(d);return f!==m?{startLine:f,endLine:m,kind:u}:null}const s=[],a=[],l=r();l.ignoreComment=!1,l.setSource(e.getText());let o=l.scan(),c=null;for(;o.type!==p.EOF;){switch(o.type){case p.CurlyL:case ur:{a.push({line:t(o),type:"brace",isStart:!0});break}case p.CurlyR:{if(a.length!==0){const d=Sc(a,"brace");if(!d)break;let u=n(o);d.type==="brace"&&(c&&n(c)!==u&&u--,d.line!==u&&s.push({startLine:d.line,endLine:u,kind:void 0}))}break}case p.Comment:{const d=m=>m==="#region"?{line:t(o),type:"comment",isStart:!0}:{line:n(o),type:"comment",isStart:!1},f=(m=>{const w=m.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(w)return d(w[1]);if(e.languageId==="scss"||e.languageId==="less"){const y=m.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(y)return d(y[1])}return null})(o);if(f)if(f.isStart)a.push(f);else{const m=Sc(a,"comment");if(!m)break;m.type==="comment"&&m.line!==f.line&&s.push({startLine:m.line,endLine:f.line,kind:"region"})}else{const m=i(o,"comment");m&&s.push(m)}break}}c=o,o=l.scan()}return s}function Sc(e,t){if(e.length===0)return null;for(let n=e.length-1;n>=0;n--)if(e[n].type===t&&e[n].isStart)return e.splice(n,1)[0];return null}function vm(e,t){const n=t&&t.rangeLimit||Number.MAX_VALUE,r=e.sort((a,l)=>{let o=a.startLine-l.startLine;return o===0&&(o=a.endLine-l.endLine),o}),i=[];let s=-1;return r.forEach(a=>{a.startLine=0;c--)if(this.__items[c].match(o))return!0;return!1},s.prototype.set_indent=function(o,c){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(o){this.__items.push(o);var c=o.lastIndexOf(` `);c!==-1?this.__character_count=o.length-c:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,c){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),c=c||"",o.indent_level>0&&(c=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}a.prototype.get_indent_size=function(o,c){var d=this.__base_string_length;return c=c||0,o<0&&(d=0),d+=o*this.__indent_size,d+=c,d},a.prototype.get_indent_string=function(o,c){var d=this.__base_string;return c=c||0,o<0&&(o=0,d=""),c+=o*this.__indent_size,this.__ensure_cache(c),d+=this.__cache[c],d},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,c=0,d="";this.__indent_size&&o>=this.__indent_size&&(c=Math.floor(o/this.__indent_size),o-=c*this.__indent_size,d=new Array(c+1).join(this.__indent_string)),o&&(d+=new Array(o+1).join(" ")),this.__cache.push(d)};function l(o,c){this.__indent_cache=new a(o,c),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,c){return this.__indent_cache.get_indent_string(o,c)},l.prototype.get_indent_size=function(o,c){return this.__indent_cache.get_indent_size(o,c)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` `&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(` `);return o!==` `&&(d=d.replace(/[\n]/g,o)),d},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,c){return o=o||0,c=c||0,this.next_line.set_indent(o,c),this.__lines.length>1?(this.current_line.set_indent(o,c),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,c){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(o)!==0&&u.item(-1)!==c){this.__lines.splice(d+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},i.exports.Output=l},,,,function(i){function s(o,c){this.raw_options=a(o,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,c){var d=this.raw_options[o],u=c||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(u=d.concat()):typeof d=="string"&&(u=d.split(/[^a-zA-Z0-9_\/\-]+/)),u},s.prototype._get_boolean=function(o,c){var d=this.raw_options[o],u=d===void 0?!!c:!!d;return u},s.prototype._get_characters=function(o,c){var d=this.raw_options[o],u=c||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),u},s.prototype._get_number=function(o,c){var d=this.raw_options[o];c=parseInt(c,10),isNaN(c)&&(c=0);var u=parseInt(d,10);return isNaN(u)&&(u=c),u},s.prototype._get_selection=function(o,c,d){var u=this._get_selection_list(o,c,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values: `+c+` You passed in: '`+this.raw_options[o]+"'");return u[0]},s.prototype._get_selection_list=function(o,c,d){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[c[0]],!this._is_valid_selection(d,c))throw new Error("Invalid Default Value!");var u=this._get_array(o,d);if(!this._is_valid_selection(u,c))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values: `+c+` You passed in: '`+this.raw_options[o]+"'");return u},s.prototype._is_valid_selection=function(o,c){return o.length&&c.length&&!o.some(function(d){return c.indexOf(d)===-1})};function a(o,c){var d={};o=l(o);var u;for(u in o)u!==c&&(d[u]=o[u]);if(c&&o[c])for(u in o[c])d[u]=o[c][u];return d}function l(o){var c={},d;for(d in o){var u=d.replace(/-/g,"_");c[u]=o[d]}return c}i.exports.Options=s,i.exports.normalizeOpts=l,i.exports.mergeOpts=a},,function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&l=0&&o=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},i.exports.InputScanner=a},,,,,function(i){function s(a,l){a=typeof a=="string"?a:a.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+l,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(a);o;)l[o[1]]=o[2],o=this.__directive_pattern.exec(a);return l},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s},,function(i,s,a){var l=a(16).Beautifier,o=a(17).Options;function c(d,u){var f=new l(d,u);return f.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new o}},function(i,s,a){var l=a(17).Options,o=a(2).Output,c=a(8).InputScanner,d=a(13).Directives,u=new d(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,m=/\r\n|[\r\n]/g,w=/\s/,y=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,R=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function N(C,I){this._source_text=C||"",this._options=new l(I),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}N.prototype.eatString=function(C){var I="";for(this._ch=this._input.next();this._ch;){if(I+=this._ch,this._ch==="\\")I+=this._input.next();else if(C.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return I},N.prototype.eatWhitespace=function(C){for(var I=w.test(this._input.peek()),D=0;w.test(this._input.peek());)this._ch=this._input.next(),C&&this._ch===` `&&(D===0||D0&&this._indentLevel--},N.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,I=this._options.eol;I==="auto"&&(I=` `,C&&f.test(C||"")&&(I=C.match(f)[0])),C=C.replace(m,` `);var D=C.match(/^[\t ]*/)[0];this._output=new o(this._options,D),this._input=new c(C),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var L=0,O=!1,z=!1,q=!1,K=!1,_=!1,v=this._ch,k=!1,F,A,M;F=this._input.read(y),A=F!=="",M=v,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),v=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var P=this._input.read(E),Q=u.get_directives(P);Q&&Q.ignore==="start"&&(P+=u.readIgnored(this._input)),this.print_string(P),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(R)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(A),this.print_string(this._ch);var J=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);J.match(/[ :]$/)&&(J=this.eatString(": ").replace(/\s+$/,""),this.print_string(J),this._output.space_before_token=!0),L===0&&J.indexOf(":")!==-1&&(z=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(A),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Y=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Y.match(/[ :]$/)&&(Y=this.eatString(": ").replace(/\s+$/,""),this.print_string(Y),this._output.space_before_token=!0),L===0&&Y.indexOf(":")!==-1?(z=!0,this.indent()):Y in this.NESTED_AT_RULE?(this._nestedLevel+=1,Y in this.CONDITIONAL_GROUP_RULE&&(q=!0)):L===0&&!z&&(K=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(A),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")z&&(z=!1,this.outdent()),K=!1,q?(q=!1,O=this._indentLevel>=this._nestedLevel):O=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&O&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),z&&(this.outdent(),z=!1),this.print_string(this._ch),O=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Ee=0;Ee"||this._ch==="+"||this._ch==="~")&&!z&&L===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&w.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(A),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),w.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Kt=M==='"'||M==="'";this.preserveSingleSpace(Kt||A),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&k&&this._output.add_new_line()}var os=this._output.get_code(I);return os},i.exports.Beautifier=N},function(i,s,a){var l=a(6).Options;function o(c){l.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var d=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||d;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f0&&Ec(r,u-1);)u--;u===0||kc(r,u-1)?d=u:u0){const d=n.insertSpaces?Do(" ",l*s):Do(" ",s);c=c.split(` `).join(` `+d),t.start.character===0&&(c=d+c)}return[{range:t,newText:c}]}function _c(e){return e.replace(/^\s+/,"")}var xm=123,Sm=125;function Cm(e,t){for(;t>=0;){const n=e.charCodeAt(t);if(n===xm)return!0;if(n===Sm)return!1;t--}return!1}function nt(e,t,n){if(e&&e.hasOwnProperty(t)){const r=e[t];if(r!==null)return r}return n}function _m(e,t,n){let r=t,i=0;const s=n.tabSize||4;for(;r && ]#",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",browsers:["E12","FF28","S9","C29","IE11","O16"],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."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | | | ? ",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],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",browsers:["E12","FF20","S9","C29","IE11","O16"],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."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | | [ ? ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],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:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],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",browsers:["E16","FF45","S10.1","C57","IE10","O44"],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:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-self"}],description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","S9","C29","IE10","O12.1"],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:"normal"},{name:"self-end"},{name:"self-start"},{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."},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"safe"},{name:"unsafe"}],syntax:"auto | normal | stretch | | ? ",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-self"}],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 | revert-layer",relevance:53,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",browsers:["E12","FF16","S9","C43","IE10","O30"],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:82,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",browsers:["E12","FF16","S9","C43","IE10","O30"],syntax:"