(function(){"use strict";class Xc{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 Yc=new Xc;function Yt(e){Qc(e)||Yc.onUnexpectedError(e)}function ys(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 Er="Canceled";function Qc(e){return e instanceof Kc?!0:e instanceof Error&&e.name===Er&&e.message===Er}class Kc extends Error{constructor(){super(Er),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 Ce extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Ce.prototype)}}function Zc(e,t){const n=this;let r=!1,i;return function(){return r||(r=!0,i=e.apply(n,arguments)),i}}var kn;(function(e){function t(E){return E&&typeof E=="object"&&typeof E[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(E){yield E}e.single=i;function s(E){return t(E)?E:i(E)}e.wrap=s;function a(E){return E||n}e.from=a;function*l(E){for(let F=E.length-1;F>=0;F--)yield E[F]}e.reverse=l;function o(E){return!E||E[Symbol.iterator]().next().done===!0}e.isEmpty=o;function c(E){return E[Symbol.iterator]().next().value}e.first=c;function d(E,F){let A=0;for(const T of E)if(F(T,A++))return!0;return!1}e.some=d;function u(E,F){for(const A of E)if(F(A))return A}e.find=u;function*f(E,F){for(const A of E)F(A)&&(yield A)}e.filter=f;function*m(E,F){let A=0;for(const T of E)yield F(T,A++)}e.map=m;function*v(E,F){let A=0;for(const T of E)yield*F(T,A++)}e.flatMap=v;function*w(...E){for(const F of E)yield*F}e.concat=w;function k(E,F,A){let T=A;for(const P of E)T=F(T,P);return T}e.reduce=k;function*R(E,F,A=E.length){for(F<0&&(F+=E.length),A<0?A+=E.length:A>E.length&&(A=E.length);F1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function eh(...e){return En(()=>xs(e))}function En(e){return{dispose:Zc(()=>{e()})}}class Qt{static{this.DISABLE_DISPOSED_WARNING=!1}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{xs(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?Qt.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)}}class Fn{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new Qt,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)}}let ae=class Cr{static{this.Undefined=new Cr(void 0)}constructor(t){this.element=t,this.next=Cr.Undefined,this.prev=Cr.Undefined}};class th{constructor(){this._first=ae.Undefined,this._last=ae.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ae.Undefined}clear(){let t=this._first;for(;t!==ae.Undefined;){const n=t.next;t.prev=ae.Undefined,t.next=ae.Undefined,t=n}this._first=ae.Undefined,this._last=ae.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new ae(t);if(this._first===ae.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!==ae.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==ae.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==ae.Undefined&&t.next!==ae.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===ae.Undefined&&t.next===ae.Undefined?(this._first=ae.Undefined,this._last=ae.Undefined):t.next===ae.Undefined?(this._last=this._last.prev,this._last.next=ae.Undefined):t.prev===ae.Undefined&&(this._first=this._first.next,this._first.prev=ae.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==ae.Undefined;)yield t.element,t=t.next}}const nh=globalThis.performance&&typeof globalThis.performance.now=="function";class Rn{static create(t){return new Rn(t)}constructor(t){this._now=nh&&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 Nn;(function(e){e.None=()=>Fn.None;function t(_,C){return f(_,()=>{},0,void 0,!0,void 0,C)}e.defer=t;function n(_){return(C,z=null,D)=>{let L=!1,U;return U=_(B=>{if(!L)return U?U.dispose():L=!0,C.call(z,B)},null,D),L&&U.dispose(),U}}e.once=n;function r(_,C){return e.once(e.filter(_,C))}e.onceIf=r;function i(_,C,z){return d((D,L=null,U)=>_(B=>D.call(L,C(B)),null,U),z)}e.map=i;function s(_,C,z){return d((D,L=null,U)=>_(B=>{C(B),D.call(L,B)},null,U),z)}e.forEach=s;function a(_,C,z){return d((D,L=null,U)=>_(B=>C(B)&&D.call(L,B),null,U),z)}e.filter=a;function l(_){return _}e.signal=l;function o(..._){return(C,z=null,D)=>{const L=eh(..._.map(U=>U(B=>C.call(z,B))));return u(L,D)}}e.any=o;function c(_,C,z,D){let L=z;return i(_,U=>(L=C(L,U),L),D)}e.reduce=c;function d(_,C){let z;const D={onWillAddFirstListener(){z=_(L.fire,L)},onDidRemoveLastListener(){z?.dispose()}},L=new Ne(D);return C?.add(L),L.event}function u(_,C){return C instanceof Array?C.push(_):C&&C.add(_),_}function f(_,C,z=100,D=!1,L=!1,U,B){let q,se,bt,kt=0,Et;const gs={leakWarningThreshold:U,onWillAddFirstListener(){q=_(gf=>{kt++,se=C(se,gf),D&&!bt&&(Sr.fire(se),se=void 0),Et=()=>{const bf=se;se=void 0,bt=void 0,(!D||kt>1)&&Sr.fire(bf),kt=0},typeof z=="number"?(clearTimeout(bt),bt=setTimeout(Et,z)):bt===void 0&&(bt=0,queueMicrotask(Et))})},onWillRemoveListener(){L&&kt>0&&Et?.()},onDidRemoveLastListener(){Et=void 0,q.dispose()}},Sr=new Ne(gs);return B?.add(Sr),Sr.event}e.debounce=f;function m(_,C=0,z){return e.debounce(_,(D,L)=>D?(D.push(L),D):[L],C,void 0,!0,void 0,z)}e.accumulate=m;function v(_,C=(D,L)=>D===L,z){let D=!0,L;return a(_,U=>{const B=D||!C(U,L);return D=!1,L=U,B},z)}e.latch=v;function w(_,C,z){return[e.filter(_,C,z),e.filter(_,D=>!C(D),z)]}e.split=w;function k(_,C=!1,z=[],D){let L=z.slice(),U=_(se=>{L?L.push(se):q.fire(se)});D&&D.add(U);const B=()=>{L?.forEach(se=>q.fire(se)),L=null},q=new Ne({onWillAddFirstListener(){U||(U=_(se=>q.fire(se)),D&&D.add(U))},onDidAddFirstListener(){L&&(C?setTimeout(B):B())},onDidRemoveLastListener(){U&&U.dispose(),U=null}});return D&&D.add(q),q.event}e.buffer=k;function R(_,C){return(D,L,U)=>{const B=C(new N);return _(function(q){const se=B.evaluate(q);se!==I&&D.call(L,se)},void 0,U)}}e.chain=R;const I=Symbol("HaltChainable");class N{constructor(){this.steps=[]}map(C){return this.steps.push(C),this}forEach(C){return this.steps.push(z=>(C(z),z)),this}filter(C){return this.steps.push(z=>C(z)?z:I),this}reduce(C,z){let D=z;return this.steps.push(L=>(D=C(D,L),D)),this}latch(C=(z,D)=>z===D){let z=!0,D;return this.steps.push(L=>{const U=z||!C(L,D);return z=!1,D=L,U?L:I}),this}evaluate(C){for(const z of this.steps)if(C=z(C),C===I)break;return C}}function E(_,C,z=D=>D){const D=(...q)=>B.fire(z(...q)),L=()=>_.on(C,D),U=()=>_.removeListener(C,D),B=new Ne({onWillAddFirstListener:L,onDidRemoveLastListener:U});return B.event}e.fromNodeEventEmitter=E;function F(_,C,z=D=>D){const D=(...q)=>B.fire(z(...q)),L=()=>_.addEventListener(C,D),U=()=>_.removeEventListener(C,D),B=new Ne({onWillAddFirstListener:L,onDidRemoveLastListener:U});return B.event}e.fromDOMEventEmitter=F;function A(_){return new Promise(C=>n(_)(C))}e.toPromise=A;function T(_){const C=new Ne;return _.then(z=>{C.fire(z)},()=>{C.fire(void 0)}).finally(()=>{C.dispose()}),C.event}e.fromPromise=T;function P(_,C){return _(z=>C.fire(z))}e.forward=P;function j(_,C,z){return C(z),_(D=>C(D))}e.runAndSubscribe=j;class Z{constructor(C,z){this._observable=C,this._counter=0,this._hasChanged=!1;const D={onWillAddFirstListener:()=>{C.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{C.removeObserver(this)}};this.emitter=new Ne(D),z&&z.add(this.emitter)}beginUpdate(C){this._counter++}handlePossibleChange(C){}handleChange(C,z){this._hasChanged=!0}endUpdate(C){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function M(_,C){return new Z(_,C).emitter.event}e.fromObservable=M;function S(_){return(C,z,D)=>{let L=0,U=!1;const B={beginUpdate(){L++},endUpdate(){L--,L===0&&(_.reportChanges(),U&&(U=!1,C.call(z)))},handlePossibleChange(){},handleChange(){U=!0}};_.addObserver(B),_.reportChanges();const q={dispose(){_.removeObserver(B)}};return D instanceof Qt?D.add(q):Array.isArray(D)&&D.push(q),q}}e.fromObservableLight=S})(Nn||(Nn={}));class Dn{static{this.all=new Set}static{this._idPool=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Dn._idPool++}`,Dn.all.add(this)}start(t){this._stopWatch=new Rn,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}}}let rh=-1;class Fr{static{this._idPool=1}constructor(t,n,r=(Fr._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.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{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);const o=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new sh(`${l}. HINT: Stack shows most frequent listener (${o[1]}-times)`,o[0]);return(this._options?.onListenerError||Yt)(c),Fn.None}if(this._disposed)return Fn.None;n&&(t=t.bind(n));const i=new Nr(t);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Rr.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof Nr?(this._deliveryQueue??=new oh,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._size++;const a=En(()=>{s?.(),this._removeListener(i)});return r instanceof Qt?r.add(a):Array.isArray(r)&&r.push(a),a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(t);if(r===-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--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*ah<=n.length){let s=0;for(let a=0;a0}}class oh{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 lh(){return globalThis._VSCODE_NLS_MESSAGES}function Ss(){return globalThis._VSCODE_NLS_LANGUAGE}const ch=Ss()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function Cs(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}),ch&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function ne(e,t,...n){return Cs(typeof e=="number"?hh(e,t):t,n)}function hh(e,t){const n=lh()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}const Nt="en";let Dr=!1,Ir=!1,Mr=!1,_s=!1,Ar=!1,In,Lr=Nt,ks=Nt,dh,Ge;const Je=globalThis;let _e;typeof Je.vscode<"u"&&typeof Je.vscode.process<"u"?_e=Je.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(_e=process);const uh=typeof _e?.versions?.electron=="string"&&_e?.type==="renderer";if(typeof _e=="object"){Dr=_e.platform==="win32",Ir=_e.platform==="darwin",Mr=_e.platform==="linux",Mr&&_e.env.SNAP&&_e.env.SNAP_REVISION,_e.env.CI||_e.env.BUILD_ARTIFACTSTAGINGDIRECTORY,In=Nt,Lr=Nt;const e=_e.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);In=t.userLocale,ks=t.osLocale,Lr=t.resolvedLanguage||Nt,dh=t.languagePack?.translationsConfigFile}catch{}_s=!0}else typeof navigator=="object"&&!uh?(Ge=navigator.userAgent,Dr=Ge.indexOf("Windows")>=0,Ir=Ge.indexOf("Macintosh")>=0,(Ge.indexOf("Macintosh")>=0||Ge.indexOf("iPad")>=0||Ge.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Mr=Ge.indexOf("Linux")>=0,Ge?.indexOf("Mobi")>=0,Ar=!0,Lr=Ss()||Nt,In=navigator.language.toLowerCase(),ks=In):console.error("Unable to resolve platform.");const Kt=Dr,ph=Ir,mh=_s,fh=Ar,gh=Ar&&typeof Je.importScripts=="function"?Je.origin:void 0,We=Ge,bh=typeof Je.postMessage=="function"&&!Je.importScripts;(()=>{if(bh){const e=[];Je.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}),Je.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();const vh=!!(We&&We.indexOf("Chrome")>=0);We&&We.indexOf("Firefox")>=0,!vh&&We&&We.indexOf("Safari")>=0,We&&We.indexOf("Edg/")>=0,We&&We.indexOf("Android")>=0;function wh(e){return e}class yh{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=wh):(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 Es{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}}function xh(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Sh(e){return e.split(/\r\n|\r|\n/)}function Ch(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 Fs(e){return e>=65&&e<=90}function Mn(e){return 55296<=e&&e<=56319}function zr(e){return 56320<=e&&e<=57343}function Rs(e,t){return(e-55296<<10)+(t-56320)+65536}function kh(e,t,n){const r=e.charCodeAt(n);if(Mn(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]}'))}static{this.cache=new yh({getCacheKey:JSON.stringify},t=>{function n(d){const u=new Map;for(let f=0;f!d.startsWith("_")&&d in s);a.length===0&&(a=["_default"]);let l;for(const d of a){const u=n(s[d]);l=i(l,u)}const o=n(s._common),c=r(o,l);return new st(c)})}static getInstance(t){return st.cache.get(Array.from(t))}static{this._locales=new Es(()=>Object.keys(st.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))}static getLocales(){return st._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class wt{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{this._data=void 0}static getData(){return this._data||(this._data=new Set(wt.getRawData())),this._data}static isInvisibleCharacter(t){return wt.getData().has(t)}static get codePoints(){return wt.getData()}}var Ns={};let Dt;const Pr=globalThis.vscode;if(typeof Pr<"u"&&typeof Pr.process<"u"){const e=Pr.process;Dt={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Dt={get platform(){return process.platform},get arch(){return process.arch},get env(){return Ns},cwd(){return Ns.VSCODE_CWD||process.cwd()}}:Dt={get platform(){return Kt?"win32":ph?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const An=Dt.cwd,Rh=Dt.env,Nh=Dt.platform,Dh=65,Ih=97,Mh=90,Ah=122,at=46,ge=47,Se=92,ot=58,Lh=63;class Ds extends Error{constructor(t,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";const s=t.indexOf(".")!==-1?"property":"argument";let a=`The "${t}" ${s} ${i} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function zh(e,t){if(e===null||typeof e!="object")throw new Ds(t,"Object",e)}function le(e,t){if(typeof e!="string")throw new Ds(t,"string",e)}const Xe=Nh==="win32";function G(e){return e===ge||e===Se}function Tr(e){return e===ge}function lt(e){return e>=Dh&&e<=Mh||e>=Ih&&e<=Ah}function Ln(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===at&&l!==-1?++l:l=-1}return i}function Ph(e){return e?`${e[0]==="."?"":"."}${e}`:""}function Is(e,t){zh(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${Ph(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ve={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],le(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=An():(s=Rh[`=${t}`]||An(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===Se)&&(s=`${t}\\`));const a=s.length;let l=0,o="",c=!1;const d=s.charCodeAt(0);if(a===1)G(d)&&(l=1,c=!0);else if(G(d))if(c=!0,G(s.charCodeAt(1))){let u=2,f=u;for(;u2&&G(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=Ln(n,!r,"\\",G),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){le(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 Tr(s)?"\\":e;if(G(s))if(i=!0,G(e.charCodeAt(1))){let l=2,o=l;for(;l2&&G(e.charCodeAt(2))&&(i=!0,n=3));let a=n0&&G(e.charCodeAt(t-1))&&(a+="\\"),r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(e){le(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return G(n)||t>2&<(n)&&e.charCodeAt(1)===ot&&G(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"&&G(n.charCodeAt(0))){++i;const s=n.length;s>1&&G(n.charCodeAt(1))&&(++i,s>2&&(G(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ve.normalize(t)},relative(e,t){if(le(e,"from"),le(t,"to"),e===t)return"";const n=ve.resolve(e),r=ve.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===Se;)s--;const a=s-i;let l=0;for(;ll&&t.charCodeAt(o-1)===Se;)o--;const c=o-l,d=ad){if(t.charCodeAt(l+f)===Se)return r.slice(l+f+1);if(f===2)return r.slice(l+f)}a>d&&(e.charCodeAt(i+f)===Se?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)===Se)&&(m+=m.length===0?"..":"\\..");return l+=u,m.length>0?`${m}${r.slice(l,o)}`:(r.charCodeAt(l)===Se&&++l,r.slice(l,o))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=ve.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Se){if(t.charCodeAt(1)===Se){const n=t.charCodeAt(2);if(n!==Lh&&n!==at)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(lt(t.charCodeAt(0))&&t.charCodeAt(1)===ot&&t.charCodeAt(2)===Se)return`\\\\?\\${t}`;return e},dirname(e){le(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return G(i)?e:".";if(G(i)){if(n=r=1,G(e.charCodeAt(1))){let l=2,o=l;for(;l2&&G(e.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let l=t-1;l>=r;--l)if(G(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&&le(t,"suffix"),le(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&<(e.charCodeAt(0))&&e.charCodeAt(1)===ot&&(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(G(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(G(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){le(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===ot&<(e.charCodeAt(0))&&(t=r=2);for(let l=e.length-1;l>=t;--l){const o=e.charCodeAt(l);if(G(o)){if(!s){r=l+1;break}continue}i===-1&&(s=!1,i=l+1),o===at?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:Is.bind(null,"\\"),parse(e){le(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 G(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(G(i)){if(r=1,G(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),G(i)){if(!o){a=c+1;break}continue}l===-1&&(o=!1,l=c+1),i===at?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},Th=(()=>{if(Xe){const e=/\\/g;return()=>{const t=An().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>An()})(),we={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:Th();le(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===ge)}return t=Ln(t,!n,"/",Tr),n?`/${t}`:t.length>0?t:"."},normalize(e){if(le(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ge,n=e.charCodeAt(e.length-1)===ge;return e=Ln(e,!t,"/",Tr),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return le(e,"path"),e.length>0&&e.charCodeAt(0)===ge},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?".":we.normalize(t)},relative(e,t){if(le(e,"from"),le(t,"to"),e===t||(e=we.resolve(e),t=we.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)===ge)return t.slice(s+c+1);if(c===0)return t.slice(s+c)}else i>l&&(e.charCodeAt(n+c)===ge?o=c:c===0&&(o=0));let d="";for(c=n+o+1;c<=r;++c)(c===r||e.charCodeAt(c)===ge)&&(d+=d.length===0?"..":"/..");return`${d}${t.slice(s+o)}`},toNamespacedPath(e){return e},dirname(e){if(le(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ge;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===ge){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&&le(t,"ext"),le(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===ge){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)===ge){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){le(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===ge){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),l===at?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:Is.bind(null,"/"),parse(e){le(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===ge;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===ge){if(!l){s=o+1;break}continue}a===-1&&(l=!1,a=o+1),d===at?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};we.win32=ve.win32=ve,we.posix=ve.posix=we,Xe?ve.normalize:we.normalize;const Oh=Xe?ve.join:we.join;Xe?ve.resolve:we.resolve,Xe?ve.relative:we.relative,Xe?ve.dirname:we.dirname,Xe?ve.basename:we.basename,Xe?ve.extname:we.extname,Xe?ve.sep:we.sep;const Wh=/^\w[\w\d+.-]*$/,Uh=/^\//,Vh=/^\/\//;function $h(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&&!Wh.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Uh.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(Vh.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 Bh(e,t){return!e&&!t?"file":e}function qh(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ze&&(t=ze+t):t=ze;break}return t}const te="",ze="/",jh=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Ue=class _r{static isUri(t){return t instanceof _r?!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=Bh(t,a),this.authority=n||te,this.path=qh(this.scheme,r||te),this.query=i||te,this.fragment=s||te,$h(this,a))}get fsPath(){return Or(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 It(n,r,i,s,a)}static parse(t,n=!1){const r=jh.exec(t);return r?new It(r[2]||te,zn(r[4]||te),zn(r[5]||te),zn(r[7]||te),zn(r[9]||te),n):new It(te,te,te,te,te)}static file(t){let n=te;if(Kt&&(t=t.replace(/\\/g,ze)),t[0]===ze&&t[1]===ze){const r=t.indexOf(ze,2);r===-1?(n=t.substring(2),t=ze):(n=t.substring(2,r),t=t.substring(r)||ze)}return new It("file",n,t,te,te)}static from(t,n){return new It(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 Kt&&t.scheme==="file"?r=_r.file(ve.join(Or(t,!0),...n)).path:r=we.join(t.path,...n),t.with({path:r})}toString(t=!1){return Wr(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof _r)return t;{const n=new It(t);return n._formatted=t.external??null,n._fsPath=t._sep===Ms?t.fsPath??null:null,n}}else return t}};const Ms=Kt?1:void 0;class It extends Ue{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Or(this,!1)),this._fsPath}toString(t=!1){return t?Wr(this,!0):(this._formatted||(this._formatted=Wr(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Ms),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 As={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 Ls(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=As[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 Hh(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,Kt&&(n=n.replace(/\//g,"\\")),n}function Wr(e,t){const n=t?Hh:Ls;let r="",{scheme:i,authority:s,path:a,query:l,fragment:o}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=ze,r+=ze),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:Ls(o,!1,!1)),r}function zs(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+zs(e.substr(3)):e}}const Ps=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function zn(e){return e.match(Ps)?e.replace(Ps,t=>zs(t)):e}var ct;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(ct||(ct={}));const Gh="tkn";class Jh{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(t){this._preferredWebSchema=t}get _remoteResourcesPath(){return we.join(this._serverRootPath,ct.vscodeRemoteResource)}rewrite(t){if(this._delegate)try{return this._delegate(t)}catch(l){return Yt(l),t}const n=t.authority;let r=this._hosts[n];r&&r.indexOf(":")!==-1&&r.indexOf("[")===-1&&(r=`[${r}]`);const i=this._ports[n],s=this._connectionTokens[n];let a=`path=${encodeURIComponent(t.path)}`;return typeof s=="string"&&(a+=`&${Gh}=${encodeURIComponent(s)}`),Ue.from({scheme:fh?this._preferredWebSchema:ct.vscodeRemoteResource,authority:`${r}:${i}`,path:this._remoteResourcesPath,query:a})}}const Xh=new Jh,Yh="vscode-app";class Pn{static{this.FALLBACK_AUTHORITY=Yh}asBrowserUri(t){const n=this.toUri(t);return this.uriToBrowserUri(n)}uriToBrowserUri(t){return t.scheme===ct.vscodeRemote?Xh.rewrite(t):t.scheme===ct.file&&(mh||gh===`${ct.vscodeFileResource}://${Pn.FALLBACK_AUTHORITY}`)?t.with({scheme:ct.vscodeFileResource,authority:t.authority||Pn.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(t,n){if(Ue.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){const r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return Ue.joinPath(Ue.parse(r,!0),t);const i=Oh(r,t);return Ue.file(i)}return Ue.parse(n.toUrl(t))}}const Ts=new Pn;var Os;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function r(s){let a;typeof s=="string"?a=new URL(s).searchParams:s instanceof URL?a=s.searchParams:Ue.isUri(s)&&(a=new URL(s.toString(!0)).searchParams);const l=a?.get(n);if(l)return t.get(l)}e.getHeadersFromQuery=r;function i(s,a,l){if(!globalThis.crossOriginIsolated)return;const o=a&&l?"3":l?"2":"1";s instanceof URLSearchParams?s.set(n,o):s[n]=o}e.addSearchParam=i})(Os||(Os={}));const Ur="default",Qh="$initialize";class Kh{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}}class Ws{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}}class Zh{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}}class ed{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}}class td{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}}class nd{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,r){const i=String(++this._lastSentReq);return new Promise((s,a)=>{this._pendingReplies[i]={resolve:s,reject:a},this._send(new Kh(this._workerId,i,t,n,r))})}listen(t,n,r){let i=null;const s=new Ne({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new Zh(this._workerId,i,t,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new td(this._workerId,i)),i=null}});return s.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}createProxyToRemoteChannel(t,n){const r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(Vs(s)?i[s]=a=>this.listen(t,s,a):Us(s)?i[s]=this.listen(t,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...a)=>(await n?.(),this.sendMessage(t,s,a)))),i[s])};return new Proxy(Object.create(null),r)}_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.channel,t.method,t.args).then(i=>{this._send(new Ws(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=ys(i.detail)),this._send(new Ws(this._workerId,n,void 0,ys(i)))})}_handleSubscribeEventMessage(t){const n=t.req,r=this._handler.handleEvent(t.channel,t.eventName,t.arg)(i=>{this._send(new ed(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;r{t(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n,r){if(t===Ur&&n===Qh)return this.initialize(r[0],r[1],r[2]);const i=t===Ur?this._requestHandler:this._localChannels.get(t);if(!i)return Promise.reject(new Error(`Missing channel ${t} on worker thread`));if(typeof i[n]!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`));try{return Promise.resolve(i[n].apply(i,r))}catch(s){return Promise.reject(s)}}_handleEvent(t,n,r){const i=t===Ur?this._requestHandler:this._localChannels.get(t);if(!i)throw new Error(`Missing channel ${t} on worker thread`);if(Vs(n)){const s=i[n].call(i,r);if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return s}if(Us(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(t){if(!this._remoteChannels.has(t)){const n=this._protocol.createProxyToRemoteChannel(t);this._remoteChannels.set(t,n)}return this._remoteChannels.get(t)}async initialize(t,n,r){if(this._protocol.setWorkerId(t),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}return 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)),import(`${Ts.asBrowserUri(`${r}.js`).toString(!0)}`).then(s=>{if(this._requestHandler=s.create(this),!this._requestHandler)throw new Error("No RequestHandler!")})}}class ht{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 $s(e,t){return(t<<5)-t+e|0}function id(e,t){t=$s(149417,t);for(let n=0,r=e.length;n>>r)>>>0}function Bs(e,t=0,n=e.byteLength,r=0){for(let i=0;in.toString(16).padStart(2,"0")).join(""):sd((e>>>0).toString(16),t/4)}class qs{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){const n=t.length;if(n===0)return;const r=this._buff;let i=this._buffLen,s=this._leftoverHighSurrogate,a,l;for(s!==0?(a=s,l=-1,s=0):(a=t.charCodeAt(0),l=0);;){let o=a;if(Mn(a))if(l+1>>6,t[n++]=128|(r&63)>>>0):r<65536?(t[n++]=224|(r&61440)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0):(t[n++]=240|(r&1835008)>>>18,t[n++]=128|(r&258048)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Zt(this._h0)+Zt(this._h1)+Zt(this._h2)+Zt(this._h3)+Zt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Bs(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Bs(this._buff));const t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){const t=qs._bigBlock32,n=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,n.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,Vr(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,a=this._h3,l=this._h4,o,c,d;for(let u=0;u<80;u++)u<20?(o=i&s|~i&a,c=1518500249):u<40?(o=i^s^a,c=1859775393):u<60?(o=i&s|i&a|s&a,c=2400959708):(o=i^s^a,c=3395469782),d=Vr(r,5)+o+l+c+t.getUint32(u*4,!1)&4294967295,l=a,a=s,s=Vr(i,30),i=r,r=d;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+l&4294967295}}class js{constructor(t){this.source=t}getElements(){const t=this.source,n=new Int32Array(t.length);for(let r=0,i=t.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new ht(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 dt{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,s,a]=dt._getElements(t),[l,o,c]=dt._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(dt._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 ht(t,0,r,i-r+1)]):t<=n?(Mt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new ht(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 ht(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 ht(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,a,l,o,c,d,u,f,m,v,w,k,R,I){let N=null,E=null,F=new Hs,A=n,T=r,P=m[0]-k[0]-i,j=-1073741824,Z=this.m_forwardHistory.length-1;do{const M=P+t;M===A||M=0&&(c=this.m_forwardHistory[Z],t=c[0],A=1,T=c.length-1)}while(--Z>=-1);if(N=F.getReverseChanges(),I[0]){let M=m[0]+1,S=k[0]+1;if(N!==null&&N.length>0){const _=N[N.length-1];M=Math.max(M,_.getOriginalEnd()),S=Math.max(S,_.getModifiedEnd())}E=[new ht(M,f-M+1,S,w-S+1)]}else{F=new Hs,A=a,T=l,P=m[0]-k[0]-o,j=1073741824,Z=R?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const M=P+s;M===A||M=d[M+1]?(u=d[M+1]-1,v=u-P-o,u>j&&F.MarkNextChange(),j=u+1,F.AddOriginalElement(u+1,v+1),P=M+1-s):(u=d[M-1],v=u-P-o,u>j&&F.MarkNextChange(),j=u,F.AddModifiedElement(u+1,v+1),P=M-1-s),Z>=0&&(d=this.m_reverseHistory[Z],s=d[0],A=1,T=d.length-1)}while(--Z>=-1);E=F.getChanges()}return this.ConcatenateChanges(N,E)}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 v=n-t+(i-r),w=v+1,k=new Int32Array(w),R=new Int32Array(w),I=i-r,N=n-t,E=t-r,F=n-i,T=(N-I)%2===0;k[I]=t,R[N]=n,l[0]=!1;for(let P=1;P<=v/2+1;P++){let j=0,Z=0;d=this.ClipDiagonalBound(I-P,P,I,w),u=this.ClipDiagonalBound(I+P,P,I,w);for(let S=d;S<=u;S+=2){S===d||Sj+Z&&(j=o,Z=c),!T&&Math.abs(S-N)<=P-1&&o>=R[S])return s[0]=o,a[0]=c,_<=R[S]&&P<=1448?this.WALKTRACE(I,d,u,E,N,f,m,F,k,R,o,n,s,c,i,a,T,l):null}const M=(j-t+(Z-r)-P)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(j,M))return l[0]=!0,s[0]=j,a[0]=Z,M>0&&P<=1448?this.WALKTRACE(I,d,u,E,N,f,m,F,k,R,o,n,s,c,i,a,T,l):(t++,r++,[new ht(t,n-t+1,r,i-r+1)]);f=this.ClipDiagonalBound(N-P,P,N,w),m=this.ClipDiagonalBound(N+P,P,N,w);for(let S=f;S<=m;S+=2){S===f||S=R[S+1]?o=R[S+1]-1:o=R[S-1],c=o-(S-N)-F;const _=o;for(;o>t&&c>r&&this.ElementsAreEqual(o,c);)o--,c--;if(R[S]=o,T&&Math.abs(S-I)<=P&&o<=k[S])return s[0]=o,a[0]=c,_>=k[S]&&P<=1448?this.WALKTRACE(I,d,u,E,N,f,m,F,k,R,o,n,s,c,i,a,T,l):null}if(P<=1447){let S=new Int32Array(u-d+2);S[0]=I-d+1,At.Copy2(k,d,S,1,u-d+1),this.m_forwardHistory.push(S),S=new Int32Array(m-f+2),S[0]=N-f+1,At.Copy2(R,f,S,1,m-f+1),this.m_reverseHistory.push(S)}}return this.WALKTRACE(I,d,u,E,N,f,m,F,k,R,o,n,s,c,i,a,T,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=w,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 At.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],At.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return At.Copy(t,0,i,0,t.length),At.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 ht(i,s,a,l),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||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 de.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return de.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 de.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 de.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 de.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 de(r,i,s,a)}intersectRanges(t){return de.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 de(r,i,s,a)}equalsRange(t){return de.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 de.getEndPosition(this)}static getEndPosition(t){return new ce(t.endLineNumber,t.endColumn)}getStartPosition(){return de.getStartPosition(this)}static getStartPosition(t){return new ce(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new de(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new de(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return de.collapseToStart(this)}static collapseToStart(t){return new de(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return de.collapseToEnd(this)}static collapseToEnd(t){return new de(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new de(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new de(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new de(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 Gs(e){return e<0?0:e>255?255:e|0}function Lt(e){return e<0?0:e>4294967295?4294967295:e|0}class $r{constructor(t){const n=Gs(t);this._defaultValue=n,this._asciiMap=$r._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=Gs(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 od{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 od(r,n,0);for(let s=0,a=t.length;s=this._maxCharCode?0:this._states.get(t,n)}}let Br=null;function cd(){return Br===null&&(Br=new ld([[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]])),Br}let en=null;function hd(){if(en===null){en=new $r(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=cd()){const r=hd(),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,v=!1,w=!1,k=!1;for(;c=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}const Js=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var On;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Wn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Nn.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Js})})(On||(On={}));class Wn{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?Js:(this._emitter||(this._emitter=new Ne),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class ud{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 Wn),this._token}cancel(){this._token?this._token instanceof Wn&&this._token.cancel():this._token=On.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Wn&&this._token.dispose():this._token=On.None}}class jr{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 Un=new jr,Hr=new jr,Gr=new jr,pd=new Array(230),md=Object.create(null),fd=Object.create(null);(function(){const t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[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,"",0,"","",""],[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","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const i of t){const[s,a,l,o,c,d,u,f,m]=i;if(r[a]||(r[a]=!0,md[l]=a,fd[l.toLowerCase()]=a),!n[o]){if(n[o]=!0,!c)throw new Error(`String representation missing for key code ${o} around scan code ${l}`);Un.define(o,c),Hr.define(o,f||c),Gr.define(o,m||f||c)}d&&(pd[d]=o)}})();var Xs;(function(e){function t(l){return Un.keyCodeToStr(l)}e.toString=t;function n(l){return Un.strToKeyCode(l)}e.fromString=n;function r(l){return Hr.keyCodeToStr(l)}e.toUserSettingsUS=r;function i(l){return Gr.keyCodeToStr(l)}e.toUserSettingsGeneral=i;function s(l){return Hr.strToKeyCode(l)||Gr.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 Un.keyCodeToStr(l)}e.toElectronAccelerator=a})(Xs||(Xs={}));function gd(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class ke extends Q{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 ke.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 ke(this.startLineNumber,this.startColumn,t,n):new ke(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new ce(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ce(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new ke(t,n,this.endLineNumber,this.endColumn):new ke(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new ke(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new ke(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new ke(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new ke(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){this._factories.get(t)?.dispose();const r=new yd(this,t,n);return this._factories.set(t,r),En(()=>{const i=this._factories.get(t);!i||i!==r||(this._factories.delete(t),i.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 yd extends Fn{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 xd{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var Ks;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Ks||(Ks={}));var Zs;(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})(Zs||(Zs={}));var ea;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(ea||(ea={}));var ta;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(ta||(ta={}));var na;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(na||(na={}));var ra;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(ra||(ra={})),ne("Array","array"),ne("Boolean","boolean"),ne("Class","class"),ne("Constant","constant"),ne("Constructor","constructor"),ne("Enum","enumeration"),ne("EnumMember","enumeration member"),ne("Event","event"),ne("Field","field"),ne("File","file"),ne("Function","function"),ne("Interface","interface"),ne("Key","key"),ne("Method","method"),ne("Module","module"),ne("Namespace","namespace"),ne("Null","null"),ne("Number","number"),ne("Object","object"),ne("Operator","operator"),ne("Package","package"),ne("Property","property"),ne("String","string"),ne("Struct","struct"),ne("TypeParameter","type parameter"),ne("Variable","variable");var ia;(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})(ia||(ia={}));let Sf=class vt{static{this.Comment=new vt("comment")}static{this.Imports=new vt("imports")}static{this.Region=new vt("region")}static fromValue(t){switch(t){case"comment":return vt.Comment;case"imports":return vt.Imports;case"region":return vt.Region}return new vt(t)}constructor(t){this.value=t}};var sa;(function(e){e[e.AIGenerated=1]="AIGenerated"})(sa||(sa={}));var aa;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(aa||(aa={}));var oa;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(oa||(oa={}));var la;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(la||(la={})),new Qs,new Qs;var ca;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(ca||(ca={}));var ha;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(ha||(ha={}));var da;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(da||(da={}));var ua;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(ua||(ua={}));var pa;(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"})(pa||(pa={}));var ma;(function(e){e[e.Deprecated=1]="Deprecated"})(ma||(ma={}));var fa;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(fa||(fa={}));var ga;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(ga||(ga={}));var ba;(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"})(ba||(ba={}));var va;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(va||(va={}));var wa;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(wa||(wa={}));var ya;(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"})(ya||(ya={}));var xa;(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.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(xa||(xa={}));var Sa;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Sa||(Sa={}));var Ca;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(Ca||(Ca={}));var _a;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(_a||(_a={}));var ka;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(ka||(ka={}));var Ea;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(Ea||(Ea={}));var Fa;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Fa||(Fa={}));var Ra;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Ra||(Ra={}));var Na;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Na||(Na={}));var Da;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Da||(Da={}));var Jr;(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"})(Jr||(Jr={}));var Xr;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(Xr||(Xr={}));var Yr;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(Yr||(Yr={}));var Ia;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(Ia||(Ia={}));var Ma;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(Ma||(Ma={}));var Aa;(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"})(Aa||(Aa={}));var La;(function(e){e[e.AIGenerated=1]="AIGenerated"})(La||(La={}));var za;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(za||(za={}));var Pa;(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"})(Pa||(Pa={}));var Ta;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Ta||(Ta={}));var Oa;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(Oa||(Oa={}));var Wa;(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"})(Wa||(Wa={}));var Ua;(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"})(Ua||(Ua={}));var Va;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Va||(Va={}));var $a;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})($a||($a={}));var Ba;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Ba||(Ba={}));var Qr;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(Qr||(Qr={}));var qa;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(qa||(qa={}));var ja;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(ja||(ja={}));var Ha;(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"})(Ha||(Ha={}));var Ga;(function(e){e[e.Deprecated=1]="Deprecated"})(Ga||(Ga={}));var Ja;(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"})(Ja||(Ja={}));var Xa;(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"})(Xa||(Xa={}));var Ya;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Ya||(Ya={}));var Qa;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Qa||(Qa={}));class Sd{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(t,n){return gd(t,n)}}function Cd(){return{editor:void 0,languages:void 0,CancellationTokenSource:ud,Emitter:Ne,KeyCode:Jr,KeyMod:Sd,Position:ce,Range:Q,Selection:ke,SelectionDirection:Qr,MarkerSeverity:Xr,MarkerTag:Yr,Uri:Ue,Token:xd}}class Vn{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(t){return t.getChannel(Vn.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(Vn.CHANNEL_NAME,n)}}var Ka;class _d{constructor(){this[Ka]="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(){return this._head?.value}get last(){return this._tail?.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}[(Ka=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 kd extends _d{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 Ed extends kd{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}}class Fd{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 Ed(10);function Rd(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function Za(e){const t=[];for(const n of Rd(e))typeof e[n]=="function"&&t.push(n);return t}function Nd(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}var eo;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(eo||(eo={}));var to;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(to||(to={}));var no;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(no||(no={}));function Dd(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 Id(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 Md(e,t,n,r,i){return Dd(e,t,n,r,i)&&Id(e,t,n,r,i)}class Ad{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){kh(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||Md(this._wordSeparators,t,n,i,s))return r}while(r);return null}}function Ld(e,t="Unreachable"){throw new Error(t)}function $n(e){if(!e()){debugger;e(),Yt(new Ce("Assertion Failed"))}}function ro(e,t){let n=0;for(;n/?";function Pd(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of zd)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const io=Pd();function so(e){let t=io;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 ao=new th;ao.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Kr(e,t,n,r,i){if(t=so(t),i||(i=kn.first(ao)),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),Kr(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=Td(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 Td(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 Od{static computeUnicodeHighlights(t,n,r){const i=r?r.startLineNumber:1,s=r?r.endLineNumber:t.getLineCount(),a=new oo(n),l=a.getCandidateCodePoints();let o;l==="allNonBasicAscii"?o=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):o=new RegExp(`${Wd(Array.from(l))}`,"g");const c=new Ad(null,o),d=[];let u=!1,f,m=0,v=0,w=0;e:for(let k=i,R=s;k<=R;k++){const I=t.getLineContent(k),N=I.length;c.reset(0);do if(f=c.next(I),f){let E=f.index,F=f.index+f[0].length;if(E>0){const j=I.charCodeAt(E-1);Mn(j)&&E--}if(F+1=1e3){u=!0;break e}d.push(new Q(k,E+1,k,F+1))}}while(f)}return{ranges:d,hasMore:u,ambiguousCharacterCount:m,invisibleCharacterCount:v,nonBasicAsciiCharacterCount:w}}static computeUnicodeHighlightReason(t,n){const r=new oo(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=st.getLocales().filter(o=>!st.getInstance(new Set([...n.allowedLocales,o])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:l}}case 1:return{kind:2}}}}function Wd(e,t){return`[${xh(e.map(r=>String.fromCodePoint(r)).join(""))}]`}class oo{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=st.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const n of wt.codePoints)lo(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=Fh(a);i=i||o,!o&&!this.ambiguousCharacters.isAmbiguous(l)&&!wt.isInvisibleCharacter(l)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!lo(t)&&wt.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function lo(e){return e===" "||e===` `||e===" "}class Bn{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}}class Ud{constructor(t,n){this.lineRangeMapping=t,this.changes=n}}class Y{static addRange(t,n){let r=0;for(;rn))return new Y(t,n)}static ofLength(t){return new Y(0,t)}static ofStartAndLength(t,n){return new Y(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new Ce(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new Y(this.start+t,this.endExclusive+t)}deltaStart(t){return new Y(this.start+t,this.endExclusive)}deltaEnd(t){return new Y(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 Ce(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new Ce(`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 Ce(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=tn(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=zt(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=zt(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 H(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=Zr(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),r=tn(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 H(s,l.startLineNumber)),s=l.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){const n=[];let r=0,i=0;for(;rn.delta(t)))}}class Pt{static{this.zero=new Pt(0,0)}static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new Pt(0,n.column-t.column):new Pt(n.lineNumber-t.lineNumber,n.column-1)}static ofRange(t){return Pt.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(const i of t)i===` `?(n++,r=0):r++;return new Pt(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}createRange(t){return this.lineCount===0?new Q(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new Q(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(t){return this.lineCount===0?new ce(t.lineNumber,t.column+this.columnCount):new ce(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}class $d{constructor(t,n){this.range=t,this.text=n}toSingleEditOperation(){return{range:this.range,text:this.text}}}class De{static inverse(t,n,r){const i=[];let s=1,a=1;for(const o of t){const c=new De(new H(s,o.original.startLineNumber),new H(a,o.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=o.original.endLineNumberExclusive,a=o.modified.endLineNumberExclusive}const l=new De(new H(s,n+1),new H(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 De(a,l))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new De(this.modified,this.original)}join(t){return new De(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 Pe(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Ce("not a valid diff");return new Pe(new Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Pe(new Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(co(this.original.endLineNumberExclusive,t)&&co(this.modified.endLineNumberExclusive,n))return new Pe(new Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Pe(Q.fromPositions(new ce(this.original.startLineNumber,1),Tt(new ce(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),Q.fromPositions(new ce(this.modified.startLineNumber,1),Tt(new ce(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Pe(Q.fromPositions(Tt(new ce(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Tt(new ce(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),Q.fromPositions(Tt(new ce(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Tt(new ce(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new Ce}}function Tt(e,t){if(e.lineNumber<1)return new ce(1,1);if(e.lineNumber>t.length)return new ce(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new ce(e.lineNumber,n.length+1):e}function co(e,t){return e>=1&&e<=t.length}class Ye extends De{static fromRangeMappings(t){const n=H.join(t.map(i=>H.fromRangeInclusive(i.originalRange))),r=H.join(t.map(i=>H.fromRangeInclusive(i.modifiedRange)));return new Ye(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new Ye(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new Ye(this.original,this.modified,[this.toRangeMapping()])}}class Pe{static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new Pe(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new $d(this.originalRange,n)}}const Bd=3;class qd{computeDiff(t,n,r){const s=new Gd(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let l=null;for(const o of s.changes){let c;o.originalEndLineNumber===0?c=new H(o.originalStartLineNumber+1,o.originalStartLineNumber+1):c=new H(o.originalStartLineNumber,o.originalEndLineNumber+1);let d;o.modifiedEndLineNumber===0?d=new H(o.modifiedStartLineNumber+1,o.modifiedStartLineNumber+1):d=new H(o.modifiedStartLineNumber,o.modifiedEndLineNumber+1);let u=new Ye(c,d,o.charChanges?.map(f=>new Pe(new Q(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn),new Q(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===u.modified.startLineNumber||l.original.endLineNumberExclusive===u.original.startLineNumber)&&(u=new Ye(l.original.join(u.original),l.modified.join(u.modified),l.innerChanges&&u.innerChanges?l.innerChanges.concat(u.innerChanges):void 0),a.pop()),a.push(u),l=u}return $n(()=>ro(a,(o,c)=>c.original.startLineNumber-o.original.endLineNumberExclusive===c.modified.startLineNumber-o.modified.endLineNumberExclusive&&o.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 Ot{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 Ot(i,s,a,l,o,c,d,u)}}function Hd(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),v=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&v.getElements().length>0){let w=ho(m,v,s,!0).changes;l&&(w=Hd(w)),f=[];for(let k=0,R=w.length;k1&&w>1;){const k=f.charCodeAt(v-2),R=m.charCodeAt(w-2);if(k!==R)break;v--,w--}(v>1||w>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,v,a+1,1,w)}{let v=ti(f,1),w=ti(m,1);const k=f.length+1,R=m.length+1;for(;v!0;const t=Date.now();return()=>Date.now()-tr===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})(ni||(ni={}));function jn(e,t){return(n,r)=>t(e(n),e(r))}const Hn=(e,t)=>e-t;function Zd(e){return(t,n)=>-e(t,n)}class Gn{static{this.empty=new Gn(t=>{})}constructor(t){this.iterate=t}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new Gn(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new Gn(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||ni.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}}class Qe{static trivial(t,n){return new Qe([new oe(Y.ofLength(t.length),Y.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new Qe([new oe(Y.ofLength(t.length),Y.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}}class oe{static invert(t,n){const r=[];return Yd(t,(i,s)=>{r.push(oe.fromOffsetPairs(i?i.getEndExclusives():Te.zero,s?s.getStarts():new Te(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new oe(new Y(t.offset1,n.offset1),new Y(t.offset2,n.offset2))}static assertSorted(t){let n;for(const r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new Ce("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new oe(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new oe(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new oe(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new oe(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new oe(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 oe(n,r)}getStarts(){return new Te(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Te(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Te{static{this.zero=new Te(0,0)}static{this.max=new Te(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new Te(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}}class rn{static{this.instance=new rn}isValid(){return!0}}class eu{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new Ce("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&w>0&&a.get(v-1,w-1)===3&&(I+=l.get(v-1,w-1)),I+=i?i(v,w):1):I=-1;const N=Math.max(k,R,I);if(N===I){const E=v>0&&w>0?l.get(v-1,w-1):0;l.set(v,w,E+1),a.set(v,w,3)}else N===k?(l.set(v,w,0),a.set(v,w,1)):N===R&&(l.set(v,w,0),a.set(v,w,2));s.set(v,w,N)}const o=[];let c=t.length,d=n.length;function u(v,w){(v+1!==c||w+1!==d)&&o.push(new oe(new Y(v+1,c),new Y(w+1,d))),c=v,d=w}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 Qe(o,!1)}}class mo{compute(t,n,r=rn.instance){if(t.length===0||n.length===0)return Qe.trivial(t,n);const i=t,s=n;function a(w,k){for(;wi.length||E>s.length)continue;const F=a(N,E);o.set(d,F);const A=N===R?c.get(d+1):c.get(d-1);if(c.set(d,F!==N?new fo(A,N,E,F-N):A),o.get(d)===i.length&&o.get(d)-d===s.length)break e}}let u=c.get(d);const f=[];let m=i.length,v=s.length;for(;;){const w=u?u.x+u.length:0,k=u?u.y+u.length:0;if((w!==m||k!==v)&&f.push(new oe(new Y(w,m),new Y(k,v))),!u)break;m=u.x,v=u.y,u=u.prev}return f.reverse(),new Qe(f,!1)}}class fo{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}}class nu{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 ru{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 Jn{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=t[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!r){const c=s.trimStart();l=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);const o=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,s.length):s.length;for(let c=0;cString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){const n=bo(t>0?this.elements[t-1]:-1),r=bo(ts<=t),i=t-this.firstElementOffsetByLineIdx[r];return new ce(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){const n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?Q.fromPositions(r,r):Q.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!si(this.elements[t]))return;let n=t;for(;n>0&&si(this.elements[n-1]);)n--;let r=t;for(;ri<=t.start)??0,r=Vd(this.firstElementOffsetByLineIdx,i=>t.endExclusive<=i)??this.elements.length;return new Y(n,r)}}function si(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const iu={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function go(e){return iu[e]}function bo(e){return e===10?8:e===13?7:ii(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 su(e,t,n,r,i,s){let{moves:a,excludedChanges:l}=ou(e,t,n,s);if(!s.isValid())return[];const o=e.filter(d=>!l.has(d)),c=lu(o,r,i,t,n,s);return Kd(a,c),a=cu(a),a=a.filter(d=>{const u=d.original.toOffsetRange().slice(t).map(m=>m.trim());return u.join(` `).length>=15&&au(u,m=>m.length>=2)>=2}),a=hu(e,a),a}function au(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function ou(e,t,n,r){const i=[],s=e.filter(o=>o.modified.isEmpty&&o.original.length>=3).map(o=>new sn(o.original,t,o)),a=new Set(e.filter(o=>o.original.isEmpty&&o.modified.length>=3).map(o=>new sn(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 De(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 lu(e,t,n,r,i,s){const a=[],l=new Fd;for(const f of e)for(let m=f.original.startLineNumber;mf.modified.startLineNumber,Hn));for(const f of e){let m=[];for(let v=f.modified.startLineNumber;v{for(const E of m)if(E.originalLineRange.endLineNumberExclusive+1===I.endLineNumberExclusive&&E.modifiedLineRange.endLineNumberExclusive+1===k.endLineNumberExclusive){E.originalLineRange=new H(E.originalLineRange.startLineNumber,I.endLineNumberExclusive),E.modifiedLineRange=new H(E.modifiedLineRange.startLineNumber,k.endLineNumberExclusive),R.push(E);return}const N={modifiedLineRange:k,originalLineRange:I};o.push(N),R.push(N)}),m=R}if(!s.isValid())return[]}o.sort(Zd(jn(f=>f.modifiedLineRange.length,Hn)));const c=new Ve,d=new Ve;for(const f of o){const m=f.modifiedLineRange.startLineNumber-f.originalLineRange.startLineNumber,v=c.subtractFrom(f.modifiedLineRange),w=d.subtractFrom(f.originalLineRange).getWithDelta(m),k=v.getIntersection(w);for(const R of k.ranges){if(R.length<3)continue;const I=R,N=R.delta(-m);a.push(new De(N,I)),c.addRange(I),d.addRange(N)}}a.sort(jn(f=>f.original.startLineNumber,Hn));const u=new qn(e);for(let f=0;fA.original.startLineNumber<=m.original.startLineNumber),w=zt(e,A=>A.modified.startLineNumber<=m.modified.startLineNumber),k=Math.max(m.original.startLineNumber-v.original.startLineNumber,m.modified.startLineNumber-w.modified.startLineNumber),R=u.findLastMonotonous(A=>A.original.startLineNumberA.modified.startLineNumberr.length||T>i.length||c.contains(T)||d.contains(A)||!vo(r[A-1],i[T-1],s))break}E>0&&(d.addRange(new H(m.original.startLineNumber-E,m.original.startLineNumber)),c.addRange(new H(m.modified.startLineNumber-E,m.modified.startLineNumber)));let F;for(F=0;Fr.length||T>i.length||c.contains(T)||d.contains(A)||!vo(r[A-1],i[T-1],s))break}F>0&&(d.addRange(new H(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+F)),c.addRange(new H(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+F))),(E>0||F>0)&&(a[f]=new De(new H(m.original.startLineNumber-E,m.original.endLineNumberExclusive+F),new H(m.modified.startLineNumber-E,m.modified.endLineNumberExclusive+F)))}return a}function vo(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new mo().compute(new Jn([e],new Q(1,1,1,e.length),!1),new Jn([t],new Q(1,1,1,t.length),!1),n);let s=0;const a=oe.invert(i.diffs,e.length);for(const d of a)d.seq1Range.forEach(u=>{ii(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 cu(e){if(e.length===0)return e;e.sort(jn(n=>n.original.startLineNumber,Hn));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 hu(e,t){const n=new qn(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 du(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=v,o=d)}return e.delta(o)}function uu(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 oe(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function pu(e,t,n){const r=oe.invert(n,e.length),i=[];let s=new Te(0,0);function a(o,c){if(o.offset10;){const k=r[0];if(!(k.seq1Range.intersects(f.seq1Range)||k.seq2Range.intersects(f.seq2Range)))break;const I=e.findWordContaining(k.seq1Range.start),N=t.findWordContaining(k.seq2Range.start),E=new oe(I,N),F=E.intersect(k);if(v+=F.seq1Range.length,w+=F.seq2Range.length,f=f.join(E),f.seq1Range.endExclusive>=k.seq1Range.endExclusive)r.shift();else break}v+w<(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 mu(n,i)}function mu(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 fu(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 gu(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||w.length>500)return!1;const R=e.getText(w).trim();if(R.length>20||R.split(/\r\n|\r|\n/).length>1)return!1;const I=e.countLinesIn(m.seq1Range),N=m.seq1Range.length,E=t.countLinesIn(m.seq2Range),F=m.seq2Range.length,A=e.countLinesIn(v.seq1Range),T=v.seq1Range.length,P=t.countLinesIn(v.seq2Range),j=v.seq2Range.length,Z=130;function M(S){return Math.min(S,Z)}return Math.pow(Math.pow(M(I*40+N),1.5)+Math.pow(M(E*40+F),1.5),1.5)+Math.pow(Math.pow(M(A*40+T),1.5)+Math.pow(M(P*40+j),1.5),1.5)>(Z**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 Qd(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 Y(f.start,o.seq1Range.start));u(m)&&(d=d.deltaStart(-m.length));const v=e.getText(new Y(o.seq1Range.endExclusive,f.endExclusive));u(v)&&(d=d.deltaEnd(v.length));const w=oe.fromOffsetPairs(l?l.getEndExclusives():Te.zero,c?c.getStarts():Te.max),k=d.intersect(w);a.length>0&&k.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(k):a.push(k)}),a}class So{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:Co(this.lines[t-1]),r=t===this.lines.length?0:Co(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 Co(e){let t=0;for(;tF===A))return new Bn([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Bn([new Ye(new H(1,t.length+1),new H(1,n.length+1),[new Pe(new Q(1,1,t.length,t[t.length-1].length+1),new Q(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?rn.instance:new eu(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function l(F){let A=a.get(F);return A===void 0&&(A=a.size,a.set(F,A)),A}const o=t.map(F=>l(F.trim())),c=n.map(F=>l(F.trim())),d=new So(o,t),u=new So(c,n),f=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(F,A)=>t[F]===n[A]?n[A].length===0?.1:1+Math.log(1+n[A].length):.99):this.myersDiffingAlgorithm.compute(d,u,i);let m=f.diffs,v=f.hitTimeout;m=wo(d,u,m),m=fu(d,u,m);const w=[],k=F=>{if(s)for(let A=0;AF.seq1Range.start-R===F.seq2Range.start-I);const A=F.seq1Range.start-R;k(A),R=F.seq1Range.endExclusive,I=F.seq2Range.endExclusive;const T=this.refineDiff(t,n,F,i,s);T.hitTimeout&&(v=!0);for(const P of T.mappings)w.push(P)}k(t.length-R);const N=_o(w,t,n);let E=[];return r.computeMoves&&(E=this.computeMoves(N,t,n,o,c,i,s)),$n(()=>{function F(T,P){if(T.lineNumber<1||T.lineNumber>P.length)return!1;const j=P[T.lineNumber-1];return!(T.column<1||T.column>j.length+1)}function A(T,P){return!(T.startLineNumber<1||T.startLineNumber>P.length+1||T.endLineNumberExclusive<1||T.endLineNumberExclusive>P.length+1)}for(const T of N){if(!T.innerChanges)return!1;for(const P of T.innerChanges)if(!(F(P.modifiedRange.getStartPosition(),n)&&F(P.modifiedRange.getEndPosition(),n)&&F(P.originalRange.getStartPosition(),t)&&F(P.originalRange.getEndPosition(),t)))return!1;if(!A(T.modified,n)||!A(T.original,t))return!1}return!0}),new Bn(N,E,v)}computeMoves(t,n,r,i,s,a,l){return su(t,n,r,i,s,a).map(d=>{const u=this.refineDiff(n,r,new oe(d.original.toOffsetRange(),d.modified.toOffsetRange()),a,l),f=_o(u.mappings,n,r,!0);return new Ud(d,f)})}refineDiff(t,n,r,i,s){const l=wu(r).toRangeMapping2(t,n),o=new Jn(t,l.originalRange,s),c=new Jn(n,l.modifiedRange,s),d=o.length+c.length<500?this.dynamicProgrammingDiffing.compute(o,c,i):this.myersDiffingAlgorithm.compute(o,c,i);let u=d.diffs;return u=wo(o,c,u),u=pu(o,c,u),u=uu(o,c,u),u=gu(o,c,u),{mappings:u.map(m=>new Pe(o.translateRange(m.seq1Range),c.translateRange(m.seq2Range))),hitTimeout:d.hitTimeout}}}function _o(e,t,n,r=!1){const i=[];for(const s of Xd(e.map(a=>vu(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 Ye(a.original.join(l.original),a.modified.join(l.modified),s.map(o=>o.innerChanges[0])))}return $n(()=>!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:ro(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 H(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),a=new H(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new Ye(s,a,[e])}function wu(e){return new De(new H(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new H(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const ko={getLegacy:()=>new qd,getDefault:()=>new bu};function ut(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class me{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 Ie{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=Ie._hue2rgb(d,c,n+1/3),l=Ie._hue2rgb(d,c,n),o=Ie._hue2rgb(d,c,n-1/3)}return new me(Math.round(a*255),Math.round(l*255),Math.round(o*255),s)}}class Wt{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 Wt(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 me(c,d,u,s)}}let Xn=class pe{static fromHex(t){return pe.Format.CSS.parseHex(t)||pe.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Ie.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Wt.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof me)this.rgba=t;else if(t instanceof Ie)this._hsla=t,this.rgba=Ie.toRGBA(t);else if(t instanceof Wt)this._hsva=t,this.rgba=Wt.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&me.equals(this.rgba,t.rgba)&&Ie.equals(this.hsla,t.hsla)&&Wt.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=pe._relativeLuminanceForComponent(this.rgba.r),n=pe._relativeLuminanceForComponent(this.rgba.g),r=pe._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=Fo(an(e,i),on(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=Fo(an(e,i),on(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=Ro(an(e,i),on(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=Ro(an(e,i),on(l,c),!0)}else a==="#"&&(o=yu(an(e,i),a+l));o&&t.push(o)}return t}function Su(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:xu(e)}const No=new RegExp("\\bMARK:\\s*(.*)$","d"),Cu=/^-+|-+$/g;function _u(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=ku(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const r=Eu(e);n=n.concat(r)}return n}function ku(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,...Do(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);Fu(i,r,t)}return t}function Fu(e,t,n){No.lastIndex=0;const r=No.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,...Do(r[1]),shouldBeInComments:!0};(l.text||l.hasSeparatorLine)&&n.push(l)}}}function Do(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(Cu,""),{text:e,hasSeparatorLine:t}}var Io;(function(e){async function t(r){let i;const s=await Promise.all(r.map(a=>a.then(l=>l,l=>{i||(i=l)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}e.withAsyncBody=n})(Io||(Io={}));class Ee{static fromArray(t){return new Ee(n=>{n.emitMany(t)})}static fromPromise(t){return new Ee(async n=>{n.emitMany(await t)})}static fromPromises(t){return new Ee(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new Ee(async n=>{await Promise.all(t.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static{this.EMPTY=Ee.fromArray([])}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new Ne,queueMicrotask(async()=>{const r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new Ee(async r=>{for await(const i of t)r.emitOne(n(i))})}map(t){return Ee.map(this,t)}static filter(t,n){return new Ee(async r=>{for await(const i of t)n(i)&&r.emitOne(i)})}filter(t){return Ee.filter(this,t)}static coalesce(t){return Ee.filter(t,n=>!!n)}coalesce(){return Ee.coalesce(this)}static async toPromise(t){const n=[];for await(const r of t)n.push(r);return n}toPromise(){return Ee.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}}class Ru{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Lt(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=Lt(t),n=Lt(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=Lt(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 Nu(i,t-a)}}class Nu{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class Du{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 ce(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;it.push(this._models[n])),t}$acceptNewModel(t){this._models[t.url]=new Mu(Ue.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]}}class Mu extends Du{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 Au{constructor(){this._workerTextModelSyncServer=new Iu}dispose(){}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){const i=this._getModel(t);return i?Od.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){const r=this._getModel(t);return r?_u(r,n):[]}async $computeDiff(t,n,r,i){const s=this._getModel(t),a=this._getModel(n);return!s||!a?null:Yn.computeDiff(s,a,r,i)}static computeDiff(t,n,r,i){const s=i==="advanced"?ko.getDefault():ko.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=>[f.original.startLineNumber,f.original.endLineNumberExclusive,f.modified.startLineNumber,f.modified.endLineNumberExclusive,f.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.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}static{this._diffLimit=1e5}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 Q.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;oYn._diffLimit){s.push({range:o,text:c});continue}const f=ad(u,c,r),m=i.offsetAt(Q.lift(o).getStartPosition());for(const v of f){const w=i.positionAt(m+v.originalStart),k=i.positionAt(m+v.originalStart+v.originalLength),R={text:c.substr(v.modifiedStart,v.modifiedLength),range:{startLineNumber:w.lineNumber,startColumn:w.column,endLineNumber:k.lineNumber,endColumn:k.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?dd(n):null}async $computeDefaultDocumentColors(t){const n=this._getModel(t);return n?Su(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){const s=new Rn,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>Yn._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(Za(this._foreignModule))):new Promise((l,o)=>{const c=d=>{this._foreignModule=d.create(a,n),l(Za(this._foreignModule))};import(`${Ts.asBrowserUri(`${t}.js`).toString(!0)}`).then(c).catch(o)})}$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)}}}typeof importScripts=="function"&&(globalThis.monaco=Cd());let oi=!1;function Mo(e){if(oi)return;oi=!0;const t=new rd(n=>{globalThis.postMessage(n)},n=>new Yn(Vn.getChannel(n),e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{oi||Mo(null)};/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1) * 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 Ao=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===Vo?(e=!0,!1):(t=n===li,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,t;return this.stream.peekChar()===qo&&(e=1),t=this.stream.peekChar(e),t>=ln&&t<=cn?(this.stream.advance(e+1),this.stream.advanceWhileChar(n=>n>=ln&&n<=cn||e===0&&n===qo),!0):!1}_newline(e){const t=this.stream.peekChar();switch(t){case Vt:case dn:case Ut:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===Vt&&this.stream.advanceIfChar(Ut)&&e.push(` `),!0}return!1}_escape(e,t){let n=this.stream.peekChar();if(n===ci){this.stream.advance(1),n=this.stream.peekChar();let r=0;for(;r<6&&(n>=ln&&n<=cn||n>=Qn&&n<=Lo||n>=Kn&&n<=Po);)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===hi||n===di?this.stream.advance(1):this._newline([]),!0}if(n!==Vt&&n!==dn&&n!==Ut)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!==ci&&n!==Vt&&n!==dn&&n!==Ut?(this.stream.advance(1),t.push(String.fromCharCode(n)),!0):!1}_string(e){if(this.stream.peekChar()===Bo||this.stream.peekChar()===$o){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!==ci&&t!==Bo&&t!==$o&&t!==Wo&&t!==Uo&&t!==hi&&t!==di&&t!==Ut&&t!==dn&&t!==Vt?(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===hi||t===di||t===Ut||t===dn||t===Vt)>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===Oo||t>=Qn&&t<=zo||t>=Kn&&t<=To||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_minus(e){const t=this.stream.peekChar();return t===yt?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_identChar(e){const t=this.stream.peekChar();return t===Oo||t===yt||t>=Qn&&t<=zo||t>=Kn&&t<=To||t>=ln&&t<=cn||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(Qu)){const e=n=>n>=ln&&n<=cn||n>=Qn&&n<=Lo||n>=Kn&&n<=Po,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(n=>n===Yu);if(t>=1&&t<=6)if(this.stream.advanceIfChar(yt)){const n=this.stream.advanceWhileChar(e);if(n>=1&&n<=6)return!0}else return!0}return!1}};function ue(e,t){if(e.length0?e.lastIndexOf(t)===n:n===0?e===t:!1}function Ku(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 J;(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"})(J||(J={}));function ui(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 pi(e,t){let n=ui(e,t);const r=[];for(;n;)r.unshift(n),n=n.parent;return r}function ep(e){const t=e.findParent(b.Declaration),n=t&&t.getValue();return n&&n.encloses(e)?t:null}var O=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 ye;)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]}},ye=class extends O{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}},tp=class extends O{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}},Me=class extends O{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return b.Identifier}containsInterpolation(){return this.hasChildren()}},np=class extends O{constructor(e,t){super(e,t)}get type(){return b.Stylesheet}},mi=class extends O{constructor(e,t){super(e,t)}get type(){return b.Declarations}},ie=class extends O{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}},xt=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Ruleset}getSelectors(){return this.selectors||(this.selectors=new ye(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(b.Declarations)!==null}},pn=class extends O{constructor(e,t){super(e,t)}get type(){return b.Selector}},$t=class extends O{constructor(e,t){super(e,t)}get type(){return b.SimpleSelector}},fi=class extends O{constructor(e,t){super(e,t)}},rp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.CustomPropertySet}},Be=class Gc extends fi{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 mi&&this.parent.getParent()instanceof Yo){const n=this.parent.getParent().getParent();if(n instanceof Gc)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}},ip=class extends Be{constructor(e,t){super(e,t)}get type(){return b.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}},gi=class extends O{constructor(e,t){super(e,t)}get type(){return b.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return Zu(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},sp=class extends O{constructor(e,t){super(e,t)}get type(){return b.Invocation}getArguments(){return this.arguments||(this.arguments=new ye(this)),this.arguments}},mn=class extends sp{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():""}},Zn=class extends O{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}},Bt=class extends O{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}},ap=class extends ie{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)}},op=class extends ie{constructor(e,t){super(e,t)}get type(){return b.For}setVariable(e){return this.setNode("variable",e,0)}},lp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Each}getVariables(){return this.variables||(this.variables=new ye(this)),this.variables}},cp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.While}},hp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Else}},er=class extends ie{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 ye(this)),this.parameters}},dp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.ViewPort}},Xo=class extends ie{constructor(e,t){super(e,t)}get type(){return b.FontFace}},Yo=class extends ie{constructor(e,t){super(e,t)}get type(){return b.NestedProperties}},Qo=class extends ie{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():""}},Ko=class extends ie{constructor(e,t){super(e,t)}get type(){return b.KeyframeSelector}},bi=class extends O{constructor(e,t){super(e,t)}get type(){return b.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}},up=class extends O{get type(){return b.Use}getParameters(){return this.parameters||(this.parameters=new ye(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},pp=class extends O{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}},mp=class extends O{get type(){return b.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new ye(this)),this.members}getParameters(){return this.parameters||(this.parameters=new ye(this)),this.parameters}},fp=class extends O{get type(){return b.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},gp=class extends O{constructor(e,t){super(e,t)}get type(){return b.Namespace}},vi=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Media}},wi=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Supports}},bp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}},vp=class extends ie{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}},wp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Document}},yp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Container}},Zo=class extends O{constructor(e,t){super(e,t)}},el=class extends O{constructor(e,t){super(e,t)}get type(){return b.MediaQuery}},xp=class extends O{constructor(e,t){super(e,t)}get type(){return b.MediaCondition}},Sp=class extends O{constructor(e,t){super(e,t)}get type(){return b.MediaFeature}},fn=class extends O{constructor(e,t){super(e,t)}get type(){return b.SupportsCondition}},Cp=class extends ie{constructor(e,t){super(e,t)}get type(){return b.Page}},_p=class extends ie{constructor(e,t){super(e,t)}get type(){return b.PageBoxMarginBox}},tl=class extends O{constructor(e,t){super(e,t)}get type(){return b.Expression}},yi=class extends O{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}},kp=class extends O{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}},Ep=class extends O{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}},xi=class extends O{constructor(e,t){super(e,t)}get type(){return b.HexColorValue}},Fp=class extends O{constructor(e,t){super(e,t)}get type(){return b.RatioValue}},Rp=46,Np=48,Dp=57,Si=class extends O{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 Tp=/{([^}]+)}/g;function Op(e,t){return Object.keys(t).length===0?e:e.replace(Tp,(n,r)=>t[r]??n)}var K=class{constructor(e,t){this.id=e,this.message=t}},y={NumberExpected:new K("css-numberexpected",g("number expected")),ConditionExpected:new K("css-conditionexpected",g("condition expected")),RuleOrSelectorExpected:new K("css-ruleorselectorexpected",g("at-rule or selector expected")),DotExpected:new K("css-dotexpected",g("dot expected")),ColonExpected:new K("css-colonexpected",g("colon expected")),SemiColonExpected:new K("css-semicolonexpected",g("semi-colon expected")),TermExpected:new K("css-termexpected",g("term expected")),ExpressionExpected:new K("css-expressionexpected",g("expression expected")),OperatorExpected:new K("css-operatorexpected",g("operator expected")),IdentifierExpected:new K("css-identifierexpected",g("identifier expected")),PercentageExpected:new K("css-percentageexpected",g("percentage expected")),URIOrStringExpected:new K("css-uriorstringexpected",g("uri or string expected")),URIExpected:new K("css-uriexpected",g("URI expected")),VariableNameExpected:new K("css-varnameexpected",g("variable name expected")),VariableValueExpected:new K("css-varvalueexpected",g("variable value expected")),PropertyValueExpected:new K("css-propertyvalueexpected",g("property value expected")),LeftCurlyExpected:new K("css-lcurlyexpected",g("{ expected")),RightCurlyExpected:new K("css-rcurlyexpected",g("} expected")),LeftSquareBracketExpected:new K("css-rbracketexpected",g("[ expected")),RightSquareBracketExpected:new K("css-lbracketexpected",g("] expected")),LeftParenthesisExpected:new K("css-lparentexpected",g("( expected")),RightParenthesisExpected:new K("css-rparentexpected",g(") expected")),CommaExpected:new K("css-commaexpected",g("comma expected")),PageDirectiveOrDeclarationExpected:new K("css-pagedirordeclexpected",g("page directive or declaraton expected")),UnknownAtRule:new K("css-unknownatrule",g("at-rule unknown")),UnknownKeyword:new K("css-unknownkeyword",g("unknown keyword")),SelectorExpected:new K("css-selectorexpected",g("selector expected")),StringLiteralExpected:new K("css-stringliteralexpected",g("string literal expected")),WhitespaceExpected:new K("css-whitespaceexpected",g("whitespace expected")),MediaQueryExpected:new K("css-mediaqueryexpected",g("media query expected")),IdentifierOrWildcardExpected:new K("css-idorwildcardexpected",g("identifier or wildcard expected")),WildcardExpected:new K("css-wildcardexpected",g("wildcard expected")),IdentifierOrVariableExpected:new K("css-idorvarexpected",g("identifier or variable expected"))},sl;(function(e){function t(n){return typeof n=="string"}e.is=t})(sl||(sl={}));var ki;(function(e){function t(n){return typeof n=="string"}e.is=t})(ki||(ki={}));var al;(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})(al||(al={}));var rr;(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})(rr||(rr={}));var xe;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=rr.MAX_VALUE),i===Number.MAX_VALUE&&(i=rr.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return x.objectLiteral(i)&&x.uinteger(i.line)&&x.uinteger(i.character)}e.is=n})(xe||(xe={}));var X;(function(e){function t(r,i,s,a){if(x.uinteger(r)&&x.uinteger(i)&&x.uinteger(s)&&x.uinteger(a))return{start:xe.create(r,i),end:xe.create(s,a)};if(xe.is(r)&&xe.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 x.objectLiteral(i)&&xe.is(i.start)&&xe.is(i.end)}e.is=n})(X||(X={}));var vn;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return x.objectLiteral(i)&&X.is(i.range)&&(x.string(i.uri)||x.undefined(i.uri))}e.is=n})(vn||(vn={}));var ol;(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 x.objectLiteral(i)&&X.is(i.targetRange)&&x.string(i.targetUri)&&X.is(i.targetSelectionRange)&&(X.is(i.originSelectionRange)||x.undefined(i.originSelectionRange))}e.is=n})(ol||(ol={}));var Ei;(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 x.objectLiteral(i)&&x.numberRange(i.red,0,1)&&x.numberRange(i.green,0,1)&&x.numberRange(i.blue,0,1)&&x.numberRange(i.alpha,0,1)}e.is=n})(Ei||(Ei={}));var ll;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){const i=r;return x.objectLiteral(i)&&X.is(i.range)&&Ei.is(i.color)}e.is=n})(ll||(ll={}));var cl;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){const i=r;return x.objectLiteral(i)&&x.string(i.label)&&(x.undefined(i.textEdit)||$.is(i))&&(x.undefined(i.additionalTextEdits)||x.typedArray(i.additionalTextEdits,$.is))}e.is=n})(cl||(cl={}));var hl;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(hl||(hl={}));var dl;(function(e){function t(r,i,s,a,l,o){const c={startLine:r,endLine:i};return x.defined(s)&&(c.startCharacter=s),x.defined(a)&&(c.endCharacter=a),x.defined(l)&&(c.kind=l),x.defined(o)&&(c.collapsedText=o),c}e.create=t;function n(r){const i=r;return x.objectLiteral(i)&&x.uinteger(i.startLine)&&x.uinteger(i.startLine)&&(x.undefined(i.startCharacter)||x.uinteger(i.startCharacter))&&(x.undefined(i.endCharacter)||x.uinteger(i.endCharacter))&&(x.undefined(i.kind)||x.string(i.kind))}e.is=n})(dl||(dl={}));var Fi;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&vn.is(i.location)&&x.string(i.message)}e.is=n})(Fi||(Fi={}));var ir;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ir||(ir={}));var ul;(function(e){e.Unnecessary=1,e.Deprecated=2})(ul||(ul={}));var pl;(function(e){function t(n){const r=n;return x.objectLiteral(r)&&x.string(r.href)}e.is=t})(pl||(pl={}));var sr;(function(e){function t(r,i,s,a,l,o){let c={range:r,message:i};return x.defined(s)&&(c.severity=s),x.defined(a)&&(c.code=a),x.defined(l)&&(c.source=l),x.defined(o)&&(c.relatedInformation=o),c}e.create=t;function n(r){var i;let s=r;return x.defined(s)&&X.is(s.range)&&x.string(s.message)&&(x.number(s.severity)||x.undefined(s.severity))&&(x.integer(s.code)||x.string(s.code)||x.undefined(s.code))&&(x.undefined(s.codeDescription)||x.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(x.string(s.source)||x.undefined(s.source))&&(x.undefined(s.relatedInformation)||x.typedArray(s.relatedInformation,Fi.is))}e.is=n})(sr||(sr={}));var St;(function(e){function t(r,i,...s){let a={title:r,command:i};return x.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.title)&&x.string(i.command)}e.is=n})(St||(St={}));var $;(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 x.objectLiteral(a)&&x.string(a.newText)&&X.is(a.range)}e.is=i})($||($={}));var Ri;(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 x.objectLiteral(i)&&x.string(i.label)&&(x.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(x.string(i.description)||i.description===void 0)}e.is=n})(Ri||(Ri={}));var qt;(function(e){function t(n){const r=n;return x.string(r)}e.is=t})(qt||(qt={}));var ml;(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 $.is(a)&&(Ri.is(a.annotationId)||qt.is(a.annotationId))}e.is=i})(ml||(ml={}));var ar;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&Li.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(ar||(ar={}));var Ni;(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"&&x.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||x.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||x.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||qt.is(i.annotationId))}e.is=n})(Ni||(Ni={}));var Di;(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"&&x.string(i.oldUri)&&x.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||x.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||x.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||qt.is(i.annotationId))}e.is=n})(Di||(Di={}));var Ii;(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"&&x.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||x.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||x.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||qt.is(i.annotationId))}e.is=n})(Ii||(Ii={}));var Mi;(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=>x.string(i.kind)?Ni.is(i)||Di.is(i)||Ii.is(i):ar.is(i)))}e.is=t})(Mi||(Mi={}));var fl;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.uri)}e.is=n})(fl||(fl={}));var Ai;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.uri)&&x.integer(i.version)}e.is=n})(Ai||(Ai={}));var Li;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.uri)&&(i.version===null||x.integer(i.version))}e.is=n})(Li||(Li={}));var gl;(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 x.defined(i)&&x.string(i.uri)&&x.string(i.languageId)&&x.integer(i.version)&&x.string(i.text)}e.is=n})(gl||(gl={}));var qe;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(qe||(qe={}));var wn;(function(e){function t(n){const r=n;return x.objectLiteral(n)&&qe.is(r.kind)&&x.string(r.value)}e.is=t})(wn||(wn={}));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 Re;(function(e){e.PlainText=1,e.Snippet=2})(Re||(Re={}));var Ct;(function(e){e.Deprecated=1})(Ct||(Ct={}));var bl;(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&&x.string(i.newText)&&X.is(i.insert)&&X.is(i.replace)}e.is=n})(bl||(bl={}));var vl;(function(e){e.asIs=1,e.adjustIndentation=2})(vl||(vl={}));var wl;(function(e){function t(n){const r=n;return r&&(x.string(r.detail)||r.detail===void 0)&&(x.string(r.description)||r.description===void 0)}e.is=t})(wl||(wl={}));var yl;(function(e){function t(n){return{label:n}}e.create=t})(yl||(yl={}));var xl;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(xl||(xl={}));var or;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return x.string(i)||x.objectLiteral(i)&&x.string(i.language)&&x.string(i.value)}e.is=n})(or||(or={}));var Sl;(function(e){function t(n){let r=n;return!!r&&x.objectLiteral(r)&&(wn.is(r.contents)||or.is(r.contents)||x.typedArray(r.contents,or.is))&&(n.range===void 0||X.is(n.range))}e.is=t})(Sl||(Sl={}));var Cl;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Cl||(Cl={}));var _l;(function(e){function t(n,r,...i){let s={label:n};return x.defined(r)&&(s.documentation=r),x.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(_l||(_l={}));var jt;(function(e){e.Text=1,e.Read=2,e.Write=3})(jt||(jt={}));var kl;(function(e){function t(n,r){let i={range:n};return x.number(r)&&(i.kind=r),i}e.create=t})(kl||(kl={}));var Ke;(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})(Ke||(Ke={}));var El;(function(e){e.Deprecated=1})(El||(El={}));var Fl;(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})(Fl||(Fl={}));var Rl;(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})(Rl||(Rl={}));var Nl;(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&&x.string(i.name)&&x.number(i.kind)&&X.is(i.range)&&X.is(i.selectionRange)&&(i.detail===void 0||x.string(i.detail))&&(i.deprecated===void 0||x.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(Nl||(Nl={}));var zi;(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"})(zi||(zi={}));var lr;(function(e){e.Invoked=1,e.Automatic=2})(lr||(lr={}));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 x.defined(i)&&x.typedArray(i.diagnostics,sr.is)&&(i.only===void 0||x.typedArray(i.only,x.string))&&(i.triggerKind===void 0||i.triggerKind===lr.Invoked||i.triggerKind===lr.Automatic)}e.is=n})(Dl||(Dl={}));var Pi;(function(e){function t(r,i,s){let a={title:r},l=!0;return typeof i=="string"?(l=!1,a.kind=i):St.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&&x.string(i.title)&&(i.diagnostics===void 0||x.typedArray(i.diagnostics,sr.is))&&(i.kind===void 0||x.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||St.is(i.command))&&(i.isPreferred===void 0||x.boolean(i.isPreferred))&&(i.edit===void 0||Mi.is(i.edit))}e.is=n})(Pi||(Pi={}));var Il;(function(e){function t(r,i){let s={range:r};return x.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return x.defined(i)&&X.is(i.range)&&(x.undefined(i.command)||St.is(i.command))}e.is=n})(Il||(Il={}));var Ml;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.uinteger(i.tabSize)&&x.boolean(i.insertSpaces)}e.is=n})(Ml||(Ml={}));var Al;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return x.defined(i)&&X.is(i.range)&&(x.undefined(i.target)||x.string(i.target))}e.is=n})(Al||(Al={}));var cr;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return x.objectLiteral(i)&&X.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(cr||(cr={}));var Ll;(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"})(Ll||(Ll={}));var zl;(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"})(zl||(zl={}));var Pl;(function(e){function t(n){const r=n;return x.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})(Pl||(Pl={}));var Tl;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&X.is(i.range)&&x.string(i.text)}e.is=n})(Tl||(Tl={}));var Ol;(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&&X.is(i.range)&&x.boolean(i.caseSensitiveLookup)&&(x.string(i.variableName)||i.variableName===void 0)}e.is=n})(Ol||(Ol={}));var Wl;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&X.is(i.range)&&(x.string(i.expression)||i.expression===void 0)}e.is=n})(Wl||(Wl={}));var Ul;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return x.defined(i)&&X.is(r.stoppedLocation)}e.is=n})(Ul||(Ul={}));var Ti;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Ti||(Ti={}));var Oi;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return x.objectLiteral(i)&&(i.tooltip===void 0||x.string(i.tooltip)||wn.is(i.tooltip))&&(i.location===void 0||vn.is(i.location))&&(i.command===void 0||St.is(i.command))}e.is=n})(Oi||(Oi={}));var Vl;(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 x.objectLiteral(i)&&xe.is(i.position)&&(x.string(i.label)||x.typedArray(i.label,Oi.is))&&(i.kind===void 0||Ti.is(i.kind))&&i.textEdits===void 0||x.typedArray(i.textEdits,$.is)&&(i.tooltip===void 0||x.string(i.tooltip)||wn.is(i.tooltip))&&(i.paddingLeft===void 0||x.boolean(i.paddingLeft))&&(i.paddingRight===void 0||x.boolean(i.paddingRight))}e.is=n})(Vl||(Vl={}));var $l;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})($l||($l={}));var Bl;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(Bl||(Bl={}));var ql;(function(e){function t(n){return{items:n}}e.create=t})(ql||(ql={}));var jl;(function(e){e.Invoked=0,e.Automatic=1})(jl||(jl={}));var Hl;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Hl||(Hl={}));var Gl;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Gl||(Gl={}));var Jl;(function(e){function t(n){const r=n;return x.objectLiteral(r)&&ki.is(r.uri)&&x.string(r.name)}e.is=t})(Jl||(Jl={}));var Xl;(function(e){function t(s,a,l,o){return new Wp(s,a,l,o)}e.create=t;function n(s){let a=s;return!!(x.defined(a)&&x.string(a.uri)&&(x.undefined(a.languageId)||x.string(a.languageId))&&x.uinteger(a.lineCount)&&x.func(a.getText)&&x.func(a.positionAt)&&x.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 xe.create(0,e);for(;ne?r=s:n=s+1}let i=n-1;return xe.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,v,w){return t.call(m)==="[object Number]"&&v<=m&&m<=w}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,v){return Array.isArray(m)&&m.every(v)}e.typedArray=f})(x||(x={}));var Yl=class bs{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(bs.isIncremental(r)){const i=Kl(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=Ql(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})(Wi||(Wi={}));function Ui(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Ui(r,t),Ui(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 Up(e){const t=Kl(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Zl;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[qe.Markdown,qe.PlainText]}},hover:{contentFormat:[qe.Markdown,qe.PlainText]}}}})(Zl||(Zl={}));var yn;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"})(yn||(yn={}));var ec={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function tc(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:$p(e,n)}:r={kind:"plaintext",value:Vp(e,n)},r.value!=="")return r}function hr(e){return e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),e.replace(//g,">")}function Vp(e,t){if(!e.description||e.description==="")return"";if(typeof e.description!="string")return e.description.value;let n="";if(t?.documentation!==!1){e.status&&(n+=tc(e.status)),n+=e.description;const r=nc(e.browsers);r&&(n+=` (`+r+")"),"syntax"in e&&(n+=` Syntax: ${e.syntax}`)}return e.references&&e.references.length>0&&t?.references!==!1&&(n.length>0&&(n+=` `),n+=e.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function $p(e,t){if(!e.description||e.description==="")return"";let n="";if(t?.documentation!==!1){e.status&&(n+=tc(e.status)),typeof e.description=="string"?n+=hr(e.description):n+=e.description.kind===qe.Markdown?e.description.value:hr(e.description.value);const r=nc(e.browsers);r&&(n+=` (`+hr(r)+")"),"syntax"in e&&e.syntax&&(n+=` Syntax: ${hr(e.syntax)}`)}return e.references&&e.references.length>0&&t?.references!==!1&&(n.length>0&&(n+=` `),n+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),n}function nc(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 ec&&(n+=ec[i]),s&&(n+=" "+s),n}).join(", ")}var Bp=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,qp=[{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.")}],jp=/^(rgb|rgba|hsl|hsla|hwb)$/i,dr={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"},Hp=new RegExp(`^(${Object.keys(dr).join("|")})$`,"i"),Vi={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(Vi).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 rc(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 Jp(e){const t=e.getName();return t?jp.test(t):!1}function ic(e){return Bp.test(e)||Hp.test(e)||Gp.test(e)}var sc=48,Xp=57,Yp=65,ur=97,Qp=102;function he(e){return e=ur&&e<=Qp?e-ur+10:0)}function ac(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:he(e.charCodeAt(1))*17/255,green:he(e.charCodeAt(2))*17/255,blue:he(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:he(e.charCodeAt(1))*17/255,green:he(e.charCodeAt(2))*17/255,blue:he(e.charCodeAt(3))*17/255,alpha:he(e.charCodeAt(4))*17/255};case 7:return{red:(he(e.charCodeAt(1))*16+he(e.charCodeAt(2)))/255,green:(he(e.charCodeAt(3))*16+he(e.charCodeAt(4)))/255,blue:(he(e.charCodeAt(5))*16+he(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(he(e.charCodeAt(1))*16+he(e.charCodeAt(2)))/255,green:(he(e.charCodeAt(3))*16+he(e.charCodeAt(4)))/255,blue:(he(e.charCodeAt(5))*16+he(e.charCodeAt(6)))/255,alpha:(he(e.charCodeAt(7))*16+he(e.charCodeAt(8)))/255}}return null}function oc(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 lc(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=oc(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 Zp(e){const t=lc(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 em(e){if(e.type===b.HexColorValue){const t=e.getText();return ac(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 yi){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=rc(r[0]),a=mt(r[1],100),l=mt(r[2],100);return oc(s,a,l,i)}else if(n==="hwb"){const s=rc(r[0]),a=mt(r[1],100),l=mt(r[2],100);return Kp(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=dr[n];if(r)return ac(r)}return null}var cc={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."},hc={"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."},dc={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."},tm=["medium","thick","thin"],uc={"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."},pc={"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."},mc={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."},fc={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},gc={"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."},bc={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."},vc={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},wc={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"]},nm=["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"],rm=["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"],im=["@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 pr(e){return Object.keys(e).map(t=>e[t])}function Ae(e){return typeof e<"u"}var mr=class{constructor(e=new un){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 O(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 ye)&&(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 il(e,t,Fe.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(np);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,y.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,y.UnknownAtRule):this.markError(e,y.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(xt),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,y.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(mi);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,y.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,y.RightCurlyExpected,[p.CurlyR,p.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,y.LeftCurlyExpected,[p.CurlyR,p.SemiColon])}_parseSelector(e){const t=this.create(pn);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(Be);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,y.PropertyValueExpected)):this.finish(n,y.ColonExpected,[p.Colon],e||[p.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(p.Ident,/^--/))return null;const t=this.create(ip);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(t,y.ColonExpected,[p.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);const n=this.mark();if(this.peek(p.CurlyL)){const i=this.create(rp),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()),Ae(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,y.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[p.CurlyR]){const t=this.create(O),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,y.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,y.LeftParenthesisExpected)}break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(t,y.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:let l=y.RightCurlyExpected;return a>0?l=y.RightSquareBracketExpected:s>0&&(l=y.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(gi),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(O);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,y.SemiColonExpected):this.finish(e,y.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(bi);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,y.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(p.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,y.IdentifierExpected,[p.SemiColon]);if(!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected,[p.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(p.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(p.ParenthesisR))?this.finish(e,y.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(gp);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,y.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,y.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(Xo);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(dp);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;const e=this.create(Qo),t=this.create(O);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,y.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,y.IdentifierExpected,[p.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([J.Keyframe])}_parseKeyframeSelector(){const e=this.create(Ko);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,y.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(Ko),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(vp);return this.consumeToken(),!this.peekRegExp(p.Ident,/^--/)||!e.setName(this._parseIdent([J.Property]))?this.finish(e,y.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const t=this.create(bp);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,y.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,y.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,y.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const t=this.create(wi);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(fn);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(fn);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,y.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,y.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,y.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(vi);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,y.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(Zo);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,y.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,y.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(el),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(Fp);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,y.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(xp);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(p.ParenthesisL))return this.finish(e,y.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,y.RightParenthesisExpected,[],[p.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[p.ParenthesisR],t=this.create(Sp);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,y.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,y.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,y.TermExpected,[],e)}}else if(t.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(t,y.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,y.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,y.TermExpected,[],e)}else return this.finish(t,y.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(O);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(Cp);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,y.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(p.AtKeyword))return null;const e=this.create(_p);return this.acceptOneKeyword(im)||this.markError(e,y.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(O);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,y.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(wp);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(yp);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(O);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(O);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,y.RightParenthesisExpected,[],[p.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.finish(e,y.LeftParenthesisExpected,[],[p.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,y.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseStyleQuery(){const e=this.create(O);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(O);if(this.accept(p.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,y.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(p.AtKeyword))return null;const e=this.create(nl);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,y.RightCurlyExpected):s>0?this.finish(e,y.RightSquareBracketExpected):i>0?this.finish(e,y.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,y.RightSquareBracketExpected);if(i>0)return this.finish(e,y.RightParenthesisExpected);break e}if(r<0){if(i===0&&s===0)break e;return this.finish(e,y.LeftCurlyExpected)}break;case p.ParenthesisL:i++;break;case p.ParenthesisR:if(i--,i<0)return this.finish(e,y.LeftParenthesisExpected);break;case p.BracketL:s++;break;case p.BracketR:if(s--,s<0)return this.finish(e,y.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(O);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(O);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(O);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(O);return this.consumeToken(),e.type=b.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){const e=this.create(O);return this.consumeToken(),e.type=b.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){const e=this.create(O);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($t);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,y.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,y.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(Ep);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,y.RightSquareBracketExpected)):this.finish(e,y.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){const t=()=>{const r=this.create(O);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,y.SelectorExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,y.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,y.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(tl);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(tp);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,y.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let n=this.create(yi);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,y.TermExpected);n=this.finish(n);const r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)}_parseTerm(){let e=this.create(kp);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(O);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,y.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(Si);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,y.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(O);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(Me);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){const e=this.mark(),t=this.create(mn);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,y.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(t):this.finish(t,y.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(p.Ident))return null;const e=this.create(Me);if(e.referenceTypes=[J.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(Bt);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(xi);return this.consumeToken(),this.finish(e)}else return null}};function sm(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=sm(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,v=0,w=0;w<=o.length;++w){if(w2){var k=u.lastIndexOf("/");if(k!==u.length-1){k===-1?(u="",f=0):f=(u=u.slice(0,k)).length-1-u.lastIndexOf("/"),m=w,v=0;continue}}else if(u.length===2||u.length===1){u="",f=0,m=w,v=0;continue}}c&&(u.length>0?u+="/..":u="..",f=2)}else u.length>0?u+="/"+o.slice(m+1,w):u=o.slice(m+1,w),f=w-m-1;m=w,v=0}else d===46&&v!==-1?++v:v=-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;dw){if(c.charCodeAt(m+R)===47)return c.slice(m+R+1);if(R===0)return c.slice(m+R)}else f>w&&(o.charCodeAt(d+R)===47?k=R:R===0&&(k=0));break}var I=o.charCodeAt(d+R);if(I!==c.charCodeAt(m+R))break;I===47&&(k=R)}var N="";for(R=d+k+1;R<=u;++R)R!==u&&o.charCodeAt(R)!==47||(N.length===0?N+="..":N+="/..");return N.length>0?N+c.slice(m+k):(m+=k,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 v=c.length-1,w=-1;for(d=o.length-1;d>=0;--d){var k=o.charCodeAt(d);if(k===47){if(!m){u=d+1;break}}else w===-1&&(m=!1,w=d+1),v>=0&&(k===c.charCodeAt(v)?--v==-1&&(f=d):(v=-1,f=w))}return u===f?f=w: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,v=o.length-1;v>=0;--v){var w=o.charCodeAt(v);if(w!==47)u===-1&&(f=!1,u=v+1),w===46?c===-1?c=v:m!==1&&(m=1):c!==-1&&(m=-1);else if(!f){d=v+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,v=0,w=-1,k=!0,R=o.length-1,I=0;R>=d;--R)if((u=o.charCodeAt(R))!==47)w===-1&&(k=!1,w=R+1),u===46?m===-1?m=R:I!==1&&(I=1):m!==-1&&(I=-1);else if(!k){v=R+1;break}return m===-1||w===-1||I===0||I===1&&m===w-1&&m===v+1?w!==-1&&(c.base=c.name=v===0&&f?o.slice(1,w):o.slice(v,w)):(v===0&&f?(c.name=o.slice(1,m),c.base=o.slice(1,w)):(c.name=o.slice(v,m),c.base=o.slice(v,w)),c.ext=o.slice(m,w)),v>0?c.dir=o.slice(0,v-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:()=>Z}),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(M,S){if(!M.scheme&&S)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!s.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!a.test(M.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(M.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{static isUri(S){return S instanceof f||!!S&&typeof S.authority=="string"&&typeof S.fragment=="string"&&typeof S.path=="string"&&typeof S.query=="string"&&typeof S.scheme=="string"&&typeof S.fsPath=="string"&&typeof S.with=="function"&&typeof S.toString=="function"}scheme;authority;path;query;fragment;constructor(S,_,C,z,D,L=!1){typeof S=="object"?(this.scheme=S.scheme||c,this.authority=S.authority||c,this.path=S.path||c,this.query=S.query||c,this.fragment=S.fragment||c):(this.scheme=(function(U,B){return U||B?U:"file"})(S,L),this.authority=_||c,this.path=(function(U,B){switch(U){case"https":case"http":case"file":B?B[0]!==d&&(B=d+B):B=d}return B})(this.scheme,C||c),this.query=z||c,this.fragment=D||c,o(this,L))}get fsPath(){return I(this)}with(S){if(!S)return this;let{scheme:_,authority:C,path:z,query:D,fragment:L}=S;return _===void 0?_=this.scheme:_===null&&(_=c),C===void 0?C=this.authority:C===null&&(C=c),z===void 0?z=this.path:z===null&&(z=c),D===void 0?D=this.query:D===null&&(D=c),L===void 0?L=this.fragment:L===null&&(L=c),_===this.scheme&&C===this.authority&&z===this.path&&D===this.query&&L===this.fragment?this:new v(_,C,z,D,L)}static parse(S,_=!1){const C=u.exec(S);return C?new v(C[2]||c,A(C[4]||c),A(C[5]||c),A(C[7]||c),A(C[9]||c),_):new v(c,c,c,c,c)}static file(S){let _=c;if(i&&(S=S.replace(/\\/g,d)),S[0]===d&&S[1]===d){const C=S.indexOf(d,2);C===-1?(_=S.substring(2),S=d):(_=S.substring(2,C),S=S.substring(C)||d)}return new v("file",_,S,c,c)}static from(S){const _=new v(S.scheme,S.authority,S.path,S.query,S.fragment);return o(_,!0),_}toString(S=!1){return N(this,S)}toJSON(){return this}static revive(S){if(S){if(S instanceof f)return S;{const _=new v(S);return _._formatted=S.external,_._fsPath=S._sep===m?S.fsPath:null,_}}return S}}const m=i?1:void 0;class v extends f{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=I(this)),this._fsPath}toString(S=!1){return S?N(this,!0):(this._formatted||(this._formatted=N(this,!1)),this._formatted)}toJSON(){const S={$mid:1};return this._fsPath&&(S.fsPath=this._fsPath,S._sep=m),this._formatted&&(S.external=this._formatted),this.path&&(S.path=this.path),this.scheme&&(S.scheme=this.scheme),this.authority&&(S.authority=this.authority),this.query&&(S.query=this.query),this.fragment&&(S.fragment=this.fragment),S}}const w={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 k(M,S,_){let C,z=-1;for(let D=0;D=97&&L<=122||L>=65&&L<=90||L>=48&&L<=57||L===45||L===46||L===95||L===126||S&&L===47||_&&L===91||_&&L===93||_&&L===58)z!==-1&&(C+=encodeURIComponent(M.substring(z,D)),z=-1),C!==void 0&&(C+=M.charAt(D));else{C===void 0&&(C=M.substr(0,D));const U=w[L];U!==void 0?(z!==-1&&(C+=encodeURIComponent(M.substring(z,D)),z=-1),C+=U):z===-1&&(z=D)}}return z!==-1&&(C+=encodeURIComponent(M.substring(z))),C!==void 0?C:M}function R(M){let S;for(let _=0;_1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?M.path[1].toLowerCase()+M.path.substr(2):M.path,i&&(_=_.replace(/\//g,"\\")),_}function N(M,S){const _=S?R:k;let C="",{scheme:z,authority:D,path:L,query:U,fragment:B}=M;if(z&&(C+=z,C+=":"),(D||z==="file")&&(C+=d,C+=d),D){let q=D.indexOf("@");if(q!==-1){const se=D.substr(0,q);D=D.substr(q+1),q=se.lastIndexOf(":"),q===-1?C+=_(se,!1,!1):(C+=_(se.substr(0,q),!1,!1),C+=":",C+=_(se.substr(q+1),!1,!0)),C+="@"}D=D.toLowerCase(),q=D.lastIndexOf(":"),q===-1?C+=_(D,!1,!0):(C+=_(D.substr(0,q),!1,!0),C+=D.substr(q))}if(L){if(L.length>=3&&L.charCodeAt(0)===47&&L.charCodeAt(2)===58){const q=L.charCodeAt(1);q>=65&&q<=90&&(L=`/${String.fromCharCode(q+32)}:${L.substr(3)}`)}else if(L.length>=2&&L.charCodeAt(1)===58){const q=L.charCodeAt(0);q>=65&&q<=90&&(L=`${String.fromCharCode(q+32)}:${L.substr(2)}`)}C+=_(L,!0,!1)}return U&&(C+="?",C+=_(U,!1,!1)),B&&(C+="#",C+=S?B:k(B,!1,!1)),C}function E(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+E(M.substr(3)):M}}const F=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function A(M){return M.match(F)?M.replace(F,S=>E(S)):M}var T=n(470);const P=T.posix||T,j="/";var Z;(function(M){M.joinPath=function(S,..._){return S.with({path:P.join(S.path,..._)})},M.resolvePath=function(S,..._){let C=S.path,z=!1;C[0]!==j&&(C=j+C,z=!0);let D=P.resolve(C,..._);return z&&D[0]===j&&!S.authority&&(D=D.substring(1)),S.with({path:D})},M.dirname=function(S){if(S.path.length===0||S.path===j)return S;let _=P.dirname(S.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),S.with({path:_})},M.basename=function(S){return P.basename(S.path)},M.extname=function(S){return P.extname(S.path)}})(Z||(Z={}))})(),Sc=r})();var{URI:Bi,Utils:ft}=Sc;function qi(e){return ft.dirname(Bi.parse(e)).toString(!0)}function Ht(e,...t){return ft.joinPath(Bi.parse(e),...t).toString(!0)}var lm=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=ji(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=ji(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=>{ue(l.label,"_")&&Ho(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=ji(e),a=ue(e,"'")||ue(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?um(n,1,-1):n,d=hm(l,s,c),u=l.substring(0,l.lastIndexOf("/")+1);let f=i.resolveReference(u||".",o);if(f)try{const m=[],v=await this.readDirectory(f);for(const[w,k]of v)w.charCodeAt(0)!==cm&&(k===yn.Directory||Ht(f,w)!==o)&&m.push(dm(w,k===yn.Directory,d));return m}catch{}return[]}},cm=46;function ji(e){return ue(e,"'")||ue(e,'"')?e.slice(1,-1):e}function hm(e,t,n){let r;const i=e.lastIndexOf("/");if(i===-1)r=n;else{const s=t.slice(i+1),a=vr(n.end,-s.length),l=s.indexOf(" ");let o;l!==-1?o=vr(a,l):o=n.end,r=X.create(a,o)}return r}function dm(e,t,n){return t?(e=e+"/",{label:br(e),kind:V.Folder,textEdit:$.replace(n,br(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:br(e),kind:V.File,textEdit:$.replace(n,br(e))}}function br(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function vr(e,t){return xe.create(e.line,e.character+t)}function um(e,t,n){const r=vr(e.start,t),i=vr(e.end,n);return X.create(r,i)}var Ze=Re.Snippet,Cc={title:"Suggest",command:"editor.action.triggerSuggest"},je;(function(e){e.Enums=" ",e.Normal="d",e.VendorPrefixed="x",e.Term="y",e.Variable="z"})(je||(je={}));var Hi=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 $i(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 lm(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=gm(e,this.offset),this.defaultReplaceRange=X.create(xe.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=pi(this.styleSheet,this.offset);for(let s=this.nodePath.length-1;s>=0;s--){const a=this.nodePath[s];if(a instanceof gi)this.getCompletionsForDeclarationProperty(a.getParent(),i);else if(a instanceof tl)a.parent instanceof Ci?this.getVariableProposals(null,i):this.getCompletionsForExpression(a,i);else if(a instanceof $t){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 Bt)this.getCompletionsForFunctionArgument(a,a.getParent(),i);else if(a instanceof mi)this.getCompletionsForDeclarations(a,i);else if(a instanceof tr)this.getCompletionsForVariableDeclaration(a,i);else if(a instanceof xt)this.getCompletionsForRuleSet(a,i);else if(a instanceof Ci)this.getCompletionsForInterpolation(a,i);else if(a instanceof er)this.getCompletionsForFunctionDeclaration(a,i);else if(a instanceof nr)this.getCompletionsForMixinReference(a,i);else if(a instanceof mn)this.getCompletionsForFunctionArgument(null,a,i);else if(a instanceof wi)this.getCompletionsForSupports(a,i);else if(a instanceof fn)this.getCompletionsForSupportsCondition(a,i);else if(a instanceof gn)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,Ae(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:xn(s)?[Ct.Deprecated]:[],textEdit:$.replace(a,l),insertTextFormat:Re.Snippet,kind:V.Property};s.restrictions||(o=!1),n&&o&&(c.command=Cc);const u=(255-(typeof s.relevance=="number"?Math.min(Math.max(s.relevance,0),99):50)).toString(16),f=ue(s.name,"-")?je.VendorPrefixed:je.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(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.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=pm(this.styleSheet,e);for(const a of s.getEntries())t.items.push({label:a,textEdit:$.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(Ho(i,")")){const o=i.lastIndexOf("(");o!==-1&&(i=i.substring(0,o+1)+"$1"+i.substring(o+1),s=Ze)}let a=je.Enums;ue(r.name,"-")&&(a+=je.VendorPrefixed);const l={label:r.name,documentation:pt(r,this.doesSupportMarkdown()),tags:xn(e)?[Ct.Deprecated]:[],textEdit:$.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 mc)n.items.push({label:r,documentation:mc[r],textEdit:$.replace(this.getCompletionRange(t),r),kind:V.Value});for(const r in fc){const i=Gt(r);n.items.push({label:r,documentation:fc[r],textEdit:$.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:Ze,command:ue(r,"var")?Cc: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,J.Variable);for(const r of n){const i=ue(r.name,"--")?`var(${r.name})`:r.name,s={label:r.name,documentation:r.value?Go(r.value):r.value,textEdit:$.replace(this.getCompletionRange(e),i),kind:V.Variable,sortText:je.Variable};if(typeof s.documentation=="string"&&ic(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 Gi;this.styleSheet.acceptVisitor(new fm(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,J.Variable);for(const r of n){if(ue(r.name,"--")){const i={label:r.name,documentation:r.value?Go(r.value):r.value,textEdit:$.replace(this.getCompletionRange(null),r.name),kind:V.Variable};typeof i.documentation=="string"&&ic(i.documentation)&&(i.kind=V.Color),e.items.push(i)}t.remove(r.name)}for(const r of t.getEntries())if(ue(r,"--")){const i={label:r,textEdit:$.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=wc[i];if(s)for(const a of s){const l=r+a;n.items.push({label:l,textEdit:$.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 X.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(const i in dr)n.items.push({label:i,documentation:dr[i],textEdit:$.replace(this.getCompletionRange(t),i),kind:V.Color});for(const i in Vi)n.items.push({label:i,documentation:Vi[i],textEdit:$.replace(this.getCompletionRange(t),i),kind:V.Value});const r=new Gi;this.styleSheet.acceptVisitor(new mm(r,this.offset));for(const i of r.getEntries())n.items.push({label:i,textEdit:$.replace(this.getCompletionRange(t),i),kind:V.Color});for(const i of qp)n.items.push({label:i.label,detail:i.func,documentation:i.desc,textEdit:$.replace(this.getCompletionRange(t),i.insertText),insertTextFormat:Ze,kind:V.Function});return n}getPositionProposals(e,t,n){for(const r in cc)n.items.push({label:r,documentation:cc[r],textEdit:$.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getRepeatStyleProposals(e,t,n){for(const r in hc)n.items.push({label:r,documentation:hc[r],textEdit:$.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getLineStyleProposals(e,t,n){for(const r in dc)n.items.push({label:r,documentation:dc[r],textEdit:$.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getLineWidthProposals(e,t,n){for(const r of tm)n.items.push({label:r,textEdit:$.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getGeometryBoxProposals(e,t,n){for(const r in pc)n.items.push({label:r,documentation:pc[r],textEdit:$.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getBoxProposals(e,t,n){for(const r in uc)n.items.push({label:r,documentation:uc[r],textEdit:$.replace(this.getCompletionRange(t),r),kind:V.Value});return n}getImageProposals(e,t,n){for(const r in gc){const i=Gt(r);n.items.push({label:r,documentation:gc[r],textEdit:$.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:r!==i?Ze:void 0})}return n}getTimingFunctionProposals(e,t,n){for(const r in bc){const i=Gt(r);n.items.push({label:r,documentation:bc[r],textEdit:$.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:r!==i?Ze:void 0})}return n}getBasicShapeProposals(e,t,n){for(const r in vc){const i=Gt(r);n.items.push({label:r,documentation:vc[r],textEdit:$.replace(this.getCompletionRange(t),i),kind:V.Function,insertTextFormat:r!==i?Ze:void 0})}return n}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof xt?this.getCompletionsForRuleSet(t,e):t instanceof wi?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:$.replace(this.getCompletionRange(null),t.name),documentation:pt(t,this.doesSupportMarkdown()),tags:xn(t)?[Ct.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=X.create(xe.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(o=>{const c=Gt(o.name),d={label:o.name,textEdit:$.replace(this.getCompletionRange(r),c),documentation:pt(o,this.doesSupportMarkdown()),tags:xn(o)?[Ct.Deprecated]:[],kind:V.Function,insertTextFormat:o.name!==c?Ze:void 0};ue(o.name,":-")&&(d.sortText=je.VendorPrefixed),n.items.push(d)}),this.cssDataManager.getPseudoElements().forEach(o=>{const c=Gt(o.name),d={label:o.name,textEdit:$.replace(this.getCompletionRange(r),c),documentation:pt(o,this.doesSupportMarkdown()),tags:xn(o)?[Ct.Deprecated]:[],kind:V.Function,insertTextFormat:o.name!==c?Ze:void 0};ue(o.name,"::-")&&(d.sortText=je.VendorPrefixed),n.items.push(d)}),!t){for(const o of nm)n.items.push({label:o,textEdit:$.replace(this.getCompletionRange(r),o),kind:V.Keyword});for(const o of rm)n.items.push({label:o,textEdit:$.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:$.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 fi){const r=n;if(!Ae(r.colonPosition)||this.offset<=r.colonPosition)return this.getCompletionsForDeclarationProperty(r,t);if(Ae(r.semicolonPosition)&&r.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const n=e.getParent();if(n instanceof Bt)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 Si||i instanceof Me?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,J.Function);for(const i of r)i.node instanceof er&&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 Zn?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:$.replace(this.getCompletionRange(n),i),insertTextFormat:Ze,kind:V.Function,sortText:je.Term}}getCompletionsForSupportsCondition(e,t){const n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof Be)return!Ae(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof fn)return this.getCompletionsForSupportsCondition(n,t)}return Ae(e.lParent)&&this.offset>e.lParent&&(!Ae(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 fn?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=X.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 Ji=class vs{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 vs&&(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 Jt);)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 vs;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(""))}},et;(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})(et||(et={}));var Yi=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function kc(e,t){let n=new Ji;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":Le(i));break;case b.ClassSelector:n.addAttr("class",Le(r.getText().substring(1)));break;case b.IdentifierSelector:n.addAttr("id",Le(r.getText().substring(1)));break;case b.MixinDeclaration:n.addAttr("class",r.getName());break;case b.PseudoSelector:n.addAttr(Le(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(Le(o.getText())){case"|=":c=`${et.remove(Le(l.getText()))}-…`;break;case"^=":c=`${et.remove(Le(l.getText()))}…`;break;case"$=":c=`…${et.remove(Le(l.getText()))}`;break;case"~=":c=` … ${et.remove(Le(l.getText()))} … `;break;case"*=":c=`…${et.remove(Le(l.getText()))}…`;break;default:c=et.remove(Le(l.getText()));break}n.addAttr(Le(a.getText()),c)}break}return n}function Le(e){const t=new un;t.setSource(e);const n=t.scanUnquotedString();return n?n.text:e}var bm=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){const n=ym(e);if(n){const r=new _c('"').print(n,t);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]}simpleSelectorToMarkedString(e){const t=kc(e),n=new _c('"').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 Yi;let a=new Yi;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 Yi;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 mr,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=[],w=d.slice(f.offset+2).split(",");for(const R of w){const I=c.internalParse(R,c._parseSelector);I&&m.push(I)}let k=t(m);s.id+=k.id,s.attr+=k.attr,s.tag+=k.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})`}},vm=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Jt)&&e.getChildren().some(n=>n.hasChildren()&&n.getChild(0).type===b.SelectorCombinator)){const n=this.element.findRoot();n.parent instanceof Jt&&(t=this.element,this.element=n.parent,this.element.removeChild(n),this.prev=null)}for(const n of e.getChildren()){if(n instanceof $t){if(this.prev instanceof $t){const s=new Xi("…");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 Xi("⋮"));const r=kc(n,t),i=r.findRoot();this.element.addChild(i),this.element=r}(n instanceof $t||n.type===b.SelectorCombinatorParent||n.type===b.SelectorCombinatorShadowPiercingDescendant||n.type===b.SelectorCombinatorSibling||n.type===b.SelectorCombinatorAllSiblings)&&(this.prev=n)}}};function wm(e){switch(e.type){case b.MixinDeclaration:case b.Stylesheet:return!0}return!1}function ym(e){if(e.matches("@at-root"))return null;const t=new Jt,n=[],r=e.getParent();if(r instanceof xt){let s=r.getParent();for(;s&&!wm(s);){if(s instanceof xt){if(s.getSelectors().matches("@at-root"))break;n.push(s)}s=s.getParent()}}const i=new vm(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 Qi=class{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new bm(t)}configure(e){this.defaultSettings=e}doHover(e,t,n,r=this.defaultSettings){function i(c){return X.create(e.positionAt(c.offset),e.positionAt(c.end))}const s=e.offsetAt(t),a=pi(n,s);let l=null,o;for(let c=0;ctypeof t=="string"?t:t.value):e.value}doesSupportMarkdown(){if(!Ae(this.supportsMarkdown)){if(!Ae(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(qe.Markdown)!==-1}return this.supportsMarkdown}},Ec=/^\w+:\/\//,Fc=/^data:/,Ki=class{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,n){const r=new $i(n),i=e.offsetAt(t),s=ui(n,i);if(!s)return null;const a=r.findSymbolFromNode(s);return a?{uri:e.uri,range:tt(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=ui(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 $i(n),a=s.findSymbolFromNode(i),l=i.getText();return n.accept(o=>{if(a){if(s.matchesSymbol(o,a))return r.push({kind:Nc(o),range:tt(o,e)}),!1}else i&&i.type===o.type&&o.matches(l)&&r.push({kind:Nc(o),range:tt(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||Fc.test(l)))if(Ec.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||Fc.test(l)))if(Ec.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=tt(i,e);if(a.start.line===a.end.line&&a.start.character===a.end.character)return;(ue(s,"'")||ue(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(ue(s,"'")||ue(s,'"'))&&r(i),!1}return!0}),n}findSymbolInformations(e,t){const n=[],r=(i,s,a)=>{const l=a instanceof O?tt(a,e):a,o={name:i||g(""),kind:s,location:vn.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 O?tt(l,e):l;let u=o instanceof O?tt(o,e):o;(!u||!Rc(d,u))&&(u=X.create(d.start,d.start));const f={name:s||g(""),kind:a,range:d,selectionRange:u};let m=r.pop();for(;m&&!Rc(m[1],d);)m=r.pop();if(m){const v=m[0];v.children||(v.children=[]),v.children.push(f),r.push(m)}else n.push(f);c&&r.push([f,tt(c,e)])};return this.collectDocumentSymbols(e,t,i),n}collectDocumentSymbols(e,t,n){t.accept(r=>{if(r instanceof xt){for(const i of r.getSelectors().getChildren())if(i instanceof pn){const s=X.create(e.positionAt(i.offset),e.positionAt(r.end));n(i.getText(),Ke.Class,s,i,r.getDeclarations())}}else if(r instanceof tr)n(r.getName(),Ke.Variable,r,r.getVariable(),void 0);else if(r instanceof bn)n(r.getName(),Ke.Method,r,r.getIdentifier(),r.getDeclarations());else if(r instanceof er)n(r.getName(),Ke.Function,r,r.getIdentifier(),r.getDeclarations());else if(r instanceof Qo){const i=g("@keyframes {0}",r.getName());n(i,Ke.Class,r,r.getIdentifier(),r.getDeclarations())}else if(r instanceof Xo){const i=g("@font-face");n(i,Ke.Class,r,void 0,r.getDeclarations())}else if(r instanceof vi){const i=r.getChild(0);if(i instanceof Zo){const s="@media "+i.getText();n(s,Ke.Module,r,i,r.getDeclarations())}}return!0})}findDocumentColors(e,t){const n=[];return t.accept(r=>{const i=xm(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:$.replace(r,o)}),n.alpha===1?o=`#${_t(s)}${_t(a)}${_t(l)}`:o=`#${_t(s)}${_t(a)}${_t(l)}${_t(Math.round(n.alpha*255))}`,i.push({label:o,textEdit:$.replace(r,o)});const c=lc(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:$.replace(r,o)});const d=Zp(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:$.replace(r,o)}),i}prepareRename(e,t,n){const r=this.getHighlightNode(e,t,n);if(r)return X.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,t,n,r){const s=this.findDocumentHighlights(e,t,r).map(a=>$.replace(a.range,n));return{changes:{[e.uri]:s}}}async resolveModuleReference(e,t,n){if(ue(t,"file://")){const r=Sm(e);if(r&&r!=="."&&r!==".."){const i=n.resolveReference("/",t),s=qi(t),a=await this.resolvePathToModule(r,s,i);if(a){const l=e.substring(r.length+1);return Ht(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(Ht(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=Ht(a,c);return this.mapReference(d=Ht(d,e.substring(o.length-1)),r)}}}return s}async resolvePathToModule(e,t,n){const r=Ht(t,"node_modules",e,"package.json");if(await this.fileExists(r))return qi(r);if(n&&t.startsWith(n)&&t.length!==n.length)return this.resolvePathToModule(e,qi(t),n)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const t=await this.fileSystemProvider.stat(e);return!(t.type===yn.Unknown&&t.size===-1)}catch{return!1}}};function xm(e,t){const n=em(e);if(n){const r=tt(e,t);return{color:n,range:r}}return null}function tt(e,t){return X.create(t.positionAt(e.offset),t.positionAt(e.end))}function Rc(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 Nc(e){if(e.type===b.Selector||e instanceof Me&&e.parent&&e.parent instanceof gi&&e.isCustomProperty)return jt.Write;if(e.parent)switch(e.parent.type){case b.FunctionDeclaration:case b.MixinDeclaration:case b.Keyframe:case b.VariableDeclaration:case b.FunctionParameter:return jt.Write}return jt.Read}function _t(e){const t=e.toString(16);return t.length!==2?"0"+t:t}function Sm(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 Xt=Fe.Warning,Dc=Fe.Error,Oe=Fe.Ignore,fe=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},Cm=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},ee={AllVendorPrefixes:new fe("compatibleVendorPrefixes",g("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Oe),IncludeStandardPropertyWhenUsingVendorPrefix:new fe("vendorPrefix",g("When using a vendor-specific prefix also include the standard property"),Xt),DuplicateDeclarations:new fe("duplicateProperties",g("Do not use duplicate style definitions"),Oe),EmptyRuleSet:new fe("emptyRules",g("Do not use empty rulesets"),Xt),ImportStatemement:new fe("importStatement",g("Import statements do not load in parallel"),Oe),BewareOfBoxModelSize:new fe("boxModel",g("Do not use width or height when using padding or border"),Oe),UniversalSelector:new fe("universalSelector",g("The universal selector (*) is known to be slow"),Oe),ZeroWithUnit:new fe("zeroUnits",g("No unit for zero needed"),Oe),RequiredPropertiesForFontFace:new fe("fontFaceProperties",g("@font-face rule must define 'src' and 'font-family' properties"),Xt),HexColorLength:new fe("hexColorLength",g("Hex colors must consist of three, four, six or eight hex numbers"),Dc),ArgsInColorFunction:new fe("argumentsInColorFunction",g("Invalid number of parameters"),Dc),UnknownProperty:new fe("unknownProperties",g("Unknown property."),Xt),UnknownAtRules:new fe("unknownAtRules",g("Unknown at-rule."),Xt),IEStarHack:new fe("ieHack",g("IE hacks are only necessary when supporting IE7 and older"),Oe),UnknownVendorSpecificProperty:new fe("unknownVendorSpecificProperties",g("Unknown vendor specific property."),Oe),PropertyIgnoredDueToDisplay:new fe("propertyIgnoredDueToDisplay",g("Property is ignored due to the display."),Xt),AvoidImportant:new fe("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."),Oe),AvoidFloat:new fe("float",g("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Oe),AvoidIdSelector:new fe("idSelector",g("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Oe)},_m={ValidProperties:new Cm("validProperties",g("A list of properties that are not validated against the `unknownProperties` rule."),[])},km=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const t=Em(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}};function Em(e){switch(e){case"ignore":return Fe.Ignore;case"warning":return Fe.Warning;case"error":return Fe.Error}return null}var Zi=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 St.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=Ku(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=$.replace(n.range,o),u=Ai.create(e.uri,e.version),f={documentChanges:[ar.create(u,[d])]},m=Pi.create(c,f,zi.QuickFix);if(m.diagnostics=[n],r.push(m),--a<=0)return}}appendFixesForMarker(e,t,n,r){if(n.code!==ee.UnknownProperty.id)return;const i=e.offsetAt(n.range.start),s=e.offsetAt(n.range.end),a=pi(t,i);for(let l=a.length-1;l>=0;l--){const o=a[l];if(o instanceof Be){const c=o.getProperty();if(c&&c.offset===i&&c.end===s){this.getFixesForUnknownProperty(e,c,n,r);return}}}}},Fm=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function Sn(e,t,n,r){const i=e[t];i.value=n,n&&(yc(i.properties,r)||i.properties.push(r))}function Rm(e,t,n){Sn(e,"top",t,n),Sn(e,"right",t,n),Sn(e,"bottom",t,n),Sn(e,"left",t,n)}function be(e,t,n,r){t==="top"||t==="right"||t==="bottom"||t==="left"?Sn(e,t,n,r):Rm(e,n,r)}function es(e,t,n){switch(t.length){case 1:be(e,void 0,t[0],n);break;case 2:be(e,"top",t[0],n),be(e,"bottom",t[0],n),be(e,"right",t[1],n),be(e,"left",t[1],n);break;case 3:be(e,"top",t[0],n),be(e,"right",t[1],n),be(e,"left",t[1],n),be(e,"bottom",t[2],n);break;case 4:be(e,"top",t[0],n),be(e,"right",t[1],n),be(e,"bottom",t[2],n),be(e,"left",t[3],n);break}}function ts(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function Cn(e,t=!0){return t&&ts(e,["initial","unset"])?!1:parseFloat(e.getText())!==0}function Ic(e,t=!0){return e.map(n=>Cn(n,t))}function wr(e,t=!0){return!(ts(e,["none","hidden"])||t&&ts(e,["initial","unset"]))}function Nm(e,t=!0){return e.map(n=>wr(n,t))}function Dm(e){const t=e.getChildren();if(t.length===1){const n=t[0];return Cn(n)&&wr(n)}for(const n of t){const r=n;if(!Cn(r,!1)||!wr(r,!1))return!1}return!0}function Im(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:be(t,i[1],Dm(r),n);break;case"width":be(t,i[1],Cn(r,!1),n);break;case"style":be(t,i[1],wr(r,!0),n);break}break;case"width":es(t,Ic(r.getChildren(),!1),n);break;case"style":es(t,Nm(r.getChildren(),!0),n);break}break;case"padding":i.length===1?es(t,Ic(r.getChildren(),!0),n):be(t,i[1],Cn(r,!0),n);break}break}}return t}var Mc=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)}},Ac=class kr{static entries(t,n,r,i,s){const a=new kr(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 Mc,this.validProperties={};const i=n.getSetting(_m.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=Fe.Warning|Fe.Error){return this.warnings.filter(n=>(n.getLevel()&t)!==0)}addEntry(t,n,r){const i=new il(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;fF.startsWith(E))&&v.delete(I)}}const w=[];for(let R=0,I=kr.prefixes.length;Rs instanceof yi?(i+=1,!1):!0),i!==r&&this.addEntry(t,ee.ArgsInColorFunction)),!0}};Ac.prefixes=["-ms-","-moz-","-o-","-webkit-"];var ns=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,Pp.entries(t)),r.push.apply(r,Ac.entries(t,e,new km(n&&n.lint),this.cssDataManager));const i=[];for(const a in ee)i.push(ee[a].id);function s(a){const l=X.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()===Fe.Warning?ir.Warning:ir.Error,range:l}}return r.filter(a=>a.getLevel()!==Fe.Ignore).map(s)}},Lc=47,Mm=10,Am=13,Lm=12,zm=36,Pm=35,Tm=123,_n=61,Om=33,Wm=60,Um=62,rs=46,nt=p.CustomToken,is=nt++,yr=nt++;nt++;var zc=nt++,Pc=nt++,ss=nt++,as=nt++,xr=nt++;nt++;var Tc=class extends un{scanNext(e){if(this.stream.advanceIfChar(zm)){const t=["$"];if(this.ident(t))return this.finishToken(e,is,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([Pm,Tm])?this.finishToken(e,yr):this.stream.advanceIfChars([_n,_n])?this.finishToken(e,zc):this.stream.advanceIfChars([Om,_n])?this.finishToken(e,Pc):this.stream.advanceIfChar(Wm)?this.stream.advanceIfChar(_n)?this.finishToken(e,as):this.finishToken(e,p.Delim):this.stream.advanceIfChar(Um)?this.stream.advanceIfChar(_n)?this.finishToken(e,ss):this.finishToken(e,p.Delim):this.stream.advanceIfChars([rs,rs,rs])?this.finishToken(e,xr):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Lc,Lc])?(this.stream.advanceWhileChar(e=>{switch(e){case Mm:case Am:case Lm:return!1;default:return!0}}),!0):!1}},os=class{constructor(e,t){this.id=e,this.message=t}},ls={FromExpected:new os("scss-fromexpected",g("'from' expected")),ThroughOrToExpected:new os("scss-throughexpected",g("'through' or 'to' expected")),InExpected:new os("scss-fromexpected",g("'in' expected"))},Vm=class extends mr{constructor(){super(new Tc)}_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(bi);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,y.URIOrStringExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,y.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(is))return null;const t=this.create(tr);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(p.Colon))return this.finish(t,y.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,y.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,y.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(as)||this.accept(ss)||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(is))return null;const e=this.create(_i);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),t=this.create(rl);return t.setIdentifier(this._parseIdent([J.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,y.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(p.Ident)&&!this.peek(yr)&&!this.peekDelim("-"))return null;const t=this.create(Me);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(yr)){const e=this.create(Ci);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(p.CurlyR)?this.finish(e):this.finish(e,y.ExpressionExpected):this.accept(p.CurlyR)?this.finish(e):this.finish(e,y.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(zc)||this.peek(Pc)||this.peek(ss)||this.peek(as)||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(O);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(Be);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,y.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,y.PropertyValueExpected);return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseNestedProperties(){const e=this.create(Yo);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(gn);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,y.SelectorExpected);for(;this.accept(p.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,y.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,y.IdentifierExpected);if(!this.accept(p.Colon))return this.finish(e,y.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,y.IdentifierExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,y.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(ap);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,y.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(hp);this._parseBody(n,e),t.setElseClause(n)}}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const t=this.create(op);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(t,ls.ThroughOrToExpected,[p.CurlyR]):t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,y.ExpressionExpected,[p.CurlyR]):this.finish(t,y.ExpressionExpected,[p.CurlyR]):this.finish(t,ls.FromExpected,[p.CurlyR]):this.finish(t,y.VariableNameExpected,[p.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const t=this.create(lp);this.consumeToken();const n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,y.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,y.VariableNameExpected,[p.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,y.ExpressionExpected,[p.CurlyR]):this.finish(t,ls.InExpected,[p.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const t=this.create(cp);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,y.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(er);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([J.Function])))return this.finish(e,y.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(e,y.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,y.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,y.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,y.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(bn);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([J.Mixin])))return this.finish(e,y.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,y.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(Zn);return e.setIdentifier(this._parseVariable())?(this.accept(xr),this.accept(p.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,y.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(Ip);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,y.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(nr);this.consumeToken();const t=this._parseIdent([J.Mixin]);if(!e.setIdentifier(t))return this.finish(e,y.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const n=this._parseIdent([J.Mixin]);if(!n)return this.finish(e,y.IdentifierExpected,[p.CurlyR]);const r=this.create(rl);t.referenceTypes=[J.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,y.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(Mp);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(e,y.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,y.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,y.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(Bt),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(p.Colon))e.setIdentifier(n);else{if(this.accept(xr))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(xr),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(O);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return t}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(O);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,y.RightParenthesisExpected)}_parseListElement(){const e=this.create(Ap),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(p.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,y.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(up);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,y.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(e,y.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([J.Module]))&&!this.acceptDelim("*"))return this.finish(e,y.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,y.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,y.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,y.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,y.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){const e=this.create(pp);return e.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,y.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,y.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(mp);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,y.StringLiteralExpected);if(this.acceptIdent("as")){const t=this._parseIdent([J.Forward]);if(!e.setIdentifier(t))return this.finish(e,y.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,y.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,y.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,y.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,y.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,y.IdentifierOrVariableExpected);return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,y.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){const e=this.create(fp);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()}},rt=g("Sass documentation"),gt=class He extends Hi{constructor(t,n){super("$",t,n),Oc(He.scssModuleLoaders),Oc(He.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 He.scssModuleBuiltIns){const s={label:i.label,documentation:i.documentation,textEdit:$.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+++":"+(He.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:$.replace(this.getCompletionRange(n),a),insertTextFormat:Re.Snippet,kind:V.Function};r&&(o.sortText="z"),i.items.push(o)}return i}getCompletionsForSelector(t,n,r){return this.createFunctionProposals(He.selectorFuncs,null,!0,r),super.getCompletionsForSelector(t,n,r)}getTermProposals(t,n,r){let i=He.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(He.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,J.Rule);for(const s of i){const a={label:s.name,textEdit:$.replace(this.getCompletionRange(n),s.name),kind:V.Function};r.items.push(a)}return r}getCompletionForAtDirectives(t){return t.items.push(...He.scssAtDirectives),t}getCompletionForTopLevel(t){return this.getCompletionForAtDirectives(t),this.getCompletionForModuleLoaders(t),super.getCompletionForTopLevel(t),t}getCompletionForModuleLoaders(t){return t.items.push(...He.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:Re.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:Re.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:Re.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:Re.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:Re.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:rt,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Re.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:rt,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Re.Snippet,kind:V.Keyword}],gt.scssModuleBuiltIns=[{label:"sass:math",documentation:g("Provides functions that operate on numbers."),references:[{name:rt,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:rt,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:rt,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:g("Lets you access and modify values in lists."),references:[{name:rt,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:rt,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:g("Provides access to Sass’s powerful selector engine."),references:[{name:rt,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:g("Exposes the details of Sass’s inner workings."),references:[{name:rt,url:"https://sass-lang.com/documentation/modules/meta"}]}];function Oc(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 Wc=47,$m=10,Bm=13,qm=12,cs=96,hs=46,jm=p.CustomToken,ds=jm++,Uc=class extends un{scanNext(e){const t=this.escapedJavaScript();return t!==null?this.finishToken(e,t):this.stream.advanceIfChars([hs,hs,hs])?this.finishToken(e,ds):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Wc,Wc])?(this.stream.advanceWhileChar(e=>{switch(e){case $m:case Bm:case qm:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===cs?(this.stream.advance(1),this.stream.advanceWhileChar(t=>t!==cs),this.stream.advanceIfChar(cs)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}},Hm=class extends mr{constructor(){super(new Uc)}_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(bi);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,y.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,y.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,y.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,y.SemiColonExpected):this.finish(e,y.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const t=this.create(el);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(tr),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,y.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(bn);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,y.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(ie);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(O),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(_i),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,y.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([J.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const t=this.create(pn);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(Me);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,y.RightCurlyExpected):this.finish(t,y.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),t=this.create(bn);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,y.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(Me),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))e=this.create(Me),this.consumeToken();else return null;return e.referenceTypes=[J.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(p.Colon))return null;const e=this.mark(),t=this.create(gn);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(gn);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,y.LeftParenthesisExpected);const t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,y.SelectorExpected);for(;this.accept(p.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,y.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,y.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(p.AtKeyword))return null;const e=this.mark(),t=this.create(nr);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,y.RightParenthesisExpected)}_tryParseMixinReference(e=!0){const t=this.mark(),n=this.create(nr);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,y.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,y.RightParenthesisExpected);r.referenceTypes=[J.Mixin]}else r.referenceTypes=[J.Mixin,J.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(Bt),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(Zn);if(this.peekKeyword("@rest")){const n=this.create(O);return this.consumeToken(),this.accept(ds)?(e.setIdentifier(this.finish(n)),this.finish(e)):this.finish(e,y.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(ds)){const n=this.create(O);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(Lp);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,y.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,y.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(zp);return e.isNegated=this.acceptIdent("not"),this.accept(p.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,y.RightParenthesisExpected)):e.isNegated?this.finish(e,y.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),t=this.create(mn);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,y.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(t):this.finish(t,y.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(Me);return e.referenceTypes=[J.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(O);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return t}},us=class ws extends Hi{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:$.replace(this.getCompletionRange(n),s.name+"($0)"),insertTextFormat:Re.Snippet,kind:V.Function};r&&(a.sortText="z"),i.items.push(a)}return i}getTermProposals(t,n,r){let i=ws.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(ws.colorProposals,n,!1,r),super.getColorProposals(t,n,r)}getCompletionsForDeclarationProperty(t,n){return this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(t,n)}};us.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);"}],us.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=Jm(e);return Xm(n,t)}function Jm(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 Tc;case"less":return new Uc;default:return new un}}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 yr:{a.push({line:t(o),type:"brace",isStart:!0});break}case p.CurlyR:{if(a.length!==0){const d=Vc(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 v=m.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(v)return d(v[1]);if(e.languageId==="scss"||e.languageId==="less"){const w=m.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(w)return d(w[1])}return null})(o);if(f)if(f.isStart)a.push(f);else{const m=Vc(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 Vc(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 Xm(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,v=/\s/,w=/(?:\s|\n)+/g,k=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,R=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function I(N,E){this._source_text=N||"",this._options=new l(E),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"]}I.prototype.eatString=function(N){var E="";for(this._ch=this._input.next();this._ch;){if(E+=this._ch,this._ch==="\\")E+=this._input.next();else if(N.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return E},I.prototype.eatWhitespace=function(N){for(var E=v.test(this._input.peek()),F=0;v.test(this._input.peek());)this._ch=this._input.next(),N&&this._ch===` `&&(F===0||F0&&this._indentLevel--},I.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var N=this._source_text,E=this._options.eol;E==="auto"&&(E=` `,N&&f.test(N||"")&&(E=N.match(f)[0])),N=N.replace(m,` `);var F=N.match(/^[\t ]*/)[0];this._output=new o(this._options,F),this._input=new c(N),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var A=0,T=!1,P=!1,j=!1,Z=!1,M=!1,S=this._ch,_=!1,C,z,D;C=this._input.read(w),z=C!=="",D=S,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),S=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var L=this._input.read(k),U=u.get_directives(L);U&&U.ignore==="start"&&(L+=u.readIgnored(this._input)),this.print_string(L),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(z),this.print_string(this._ch);var B=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);B.match(/[ :]$/)&&(B=this.eatString(": ").replace(/\s+$/,""),this.print_string(B),this._output.space_before_token=!0),A===0&&B.indexOf(":")!==-1&&(P=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(z),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var q=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);q.match(/[ :]$/)&&(q=this.eatString(": ").replace(/\s+$/,""),this.print_string(q),this._output.space_before_token=!0),A===0&&q.indexOf(":")!==-1?(P=!0,this.indent()):q in this.NESTED_AT_RULE?(this._nestedLevel+=1,q in this.CONDITIONAL_GROUP_RULE&&(j=!0)):A===0&&!P&&(Z=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(z),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")P&&(P=!1,this.outdent()),Z=!1,j?(j=!1,T=this._indentLevel>=this._nestedLevel):T=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&T&&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)):(D==="("?this._output.space_before_token=!1:D!==","&&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(),D==="{"&&this._output.trim(!0),P&&(this.outdent(),P=!1),this.print_string(this._ch),T=!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 se=0;se"||this._ch==="+"||this._ch==="~")&&!P&&A===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&v.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(z),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),v.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 Et=D==='"'||D==="'";this.preserveSingleSpace(Et||z),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&_&&this._output.add_new_line()}var gs=this._output.get_code(E);return gs},i.exports.Beautifier=I},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&&jc(r,u-1);)u--;u===0||qc(r,u-1)?d=u:u0){const d=n.insertSpaces?Jo(" ",l*s):Jo(" ",s);c=c.split(` `).join(` `+d),t.start.character===0&&(c=d+c)}return[{range:t,newText:c}]}function Bc(e){return e.replace(/^\s+/,"")}var Km=123,Zm=125;function ef(e,t){for(;t>=0;){const n=e.charCodeAt(t);if(n===Km)return!0;if(n===Zm)return!1;t--}return!1}function it(e,t,n){if(e&&e.hasOwnProperty(t)){const r=e[t];if(r!==null)return r}return n}function tf(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:"