META-INF.resources.primefaces-extensions.monacoeditor.json.worker.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources-monacoeditor Show documentation
Show all versions of resources-monacoeditor Show documentation
Monaco Editor Resources for PrimeFaces Extensions Project for Maven.
The newest version!
!function(){"use strict";var e={68621:function(e,t,n){n.d(t,{n:function(){return ms}});const r=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(u.isErrorNoTelemetry(e))throw new u(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function i(e){a(e)||r.onUnexpectedError(e)}function s(e){if(e instanceof Error){const{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack,noTelemetry:u.isErrorNoTelemetry(e)}}return e}const o="Canceled";function a(e){return e instanceof l||e instanceof Error&&e.name===o&&e.message===o}class l extends Error{constructor(){super(o),this.name=this.message}}Error;class u extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof u)return e;const t=new u;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class c extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,c.prototype)}}function h(e,t){const n=this;let r,i=!1;return function(){if(i)return r;if(i=!0,t)try{r=e.apply(n,arguments)}finally{t()}else r=e.apply(n,arguments);return r}}var d;!function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function*r(e){yield e}e.empty=function(){return n},e.single=r,e.wrap=function(e){return t(e)?e:r(e)},e.from=function(e){return e||n},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let n=0;for(const r of e)if(t(r,n++))return!0;return!1},e.find=function(e,t){for(const n of e)if(t(n))return n},e.filter=function*(e,t){for(const n of e)t(n)&&(yield n)},e.map=function*(e,t){let n=0;for(const r of e)yield t(r,n++)},e.flatMap=function*(e,t){let n=0;for(const r of e)yield*t(r,n++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,n){let r=n;for(const n of e)r=t(r,n);return r},e.slice=function*(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function y(...e){const t=v((()=>b(e)));return function(e,t){if(f)for(const n of e)f.setParent(n,t)}(e,t),t}function v(e){const t=m({dispose:h((()=>{g(t),e()}))});return t}class _{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){this._isDisposed||(g(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{b(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return p(e,this),this._isDisposed?_.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),p(e,null))}}class C{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new _,m(this),p(this._store,this)}dispose(){g(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Symbol.iterator;class S{static{this.Undefined=new S(void 0)}constructor(e){this.element=e,this.next=S.Undefined,this.prev=S.Undefined}}class w{constructor(){this._first=S.Undefined,this._last=S.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===S.Undefined}clear(){let e=this._first;for(;e!==S.Undefined;){const t=e.next;e.prev=S.Undefined,e.next=S.Undefined,e=t}this._first=S.Undefined,this._last=S.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new S(e);if(this._first===S.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==S.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==S.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==S.Undefined&&e.next!==S.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===S.Undefined&&e.next===S.Undefined?(this._first=S.Undefined,this._last=S.Undefined):e.next===S.Undefined?(this._last=this._last.prev,this._last.next=S.Undefined):e.prev===S.Undefined&&(this._first=this._first.next,this._first.prev=S.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==S.Undefined;)yield e.element,e=e.next}}const L=globalThis.performance&&"function"==typeof globalThis.performance.now;class N{static create(e){return new N(e)}constructor(e){this._now=L&&!1===e?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-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}var x;!function(e){function t(e){false}function n(e){return(t,n=null,r)=>{let i,s=!1;return i=e((e=>{if(!s)return i?i.dispose():s=!0,t.call(n,e)}),null,r),s&&i.dispose(),i}}function r(e,t,n){return s(((n,r=null,i)=>e((e=>n.call(r,t(e))),null,i)),n)}function i(e,t,n){return s(((n,r=null,i)=>e((e=>t(e)&&n.call(r,e)),null,i)),n)}function s(e,n){let r;const i={onWillAddFirstListener(){r=e(s.fire,s)},onDidRemoveLastListener(){r?.dispose()}};n||t();const s=new I(i);return n?.add(s),s.event}function o(e,n,r=100,i=!1,s=!1,o,a){let l,u,c,h,d=0;const f={leakWarningThreshold:o,onWillAddFirstListener(){l=e((e=>{d++,u=n(u,e),i&&!c&&(m.fire(u),u=void 0),h=()=>{const e=u;u=void 0,c=void 0,(!i||d>1)&&m.fire(e),d=0},"number"==typeof r?(clearTimeout(c),c=setTimeout(h,r)):void 0===c&&(c=0,queueMicrotask(h))}))},onWillRemoveListener(){s&&d>0&&h?.()},onDidRemoveLastListener(){h=void 0,l.dispose()}};a||t();const m=new I(f);return a?.add(m),m.event}e.None=()=>C.None,e.defer=function(e,t){return o(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=n,e.map=r,e.forEach=function(e,t,n){return s(((n,r=null,i)=>e((e=>{t(e),n.call(r,e)}),null,i)),n)},e.filter=i,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,r)=>function(e,t){t instanceof Array?t.push(e):t&&t.add(e);return e}(y(...e.map((e=>e((e=>t.call(n,e)))))),r)},e.reduce=function(e,t,n,i){let s=n;return r(e,(e=>(s=t(s,e),s)),i)},e.debounce=o,e.accumulate=function(t,n=0,r){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),n,void 0,!0,void 0,r)},e.latch=function(e,t=((e,t)=>e===t),n){let r,s=!0;return i(e,(e=>{const n=s||!t(e,r);return s=!1,r=e,n}),n)},e.split=function(t,n,r){return[e.filter(t,n,r),e.filter(t,(e=>!n(e)),r)]},e.buffer=function(e,t=!1,n=[],r){let i=n.slice(),s=e((e=>{i?i.push(e):a.fire(e)}));r&&r.add(s);const o=()=>{i?.forEach((e=>a.fire(e))),i=null},a=new I({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),r&&r.add(s))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return r&&r.add(a),a.event},e.chain=function(e,t){return(n,r,i)=>{const s=t(new l);return e((function(e){const t=s.evaluate(e);t!==a&&n.call(r,t)}),void 0,i)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:a)),this}reduce(e,t){let n=t;return this.steps.push((t=>(n=e(n,t),n))),this}latch(e=((e,t)=>e===t)){let t,n=!0;return this.steps.push((r=>{const i=n||!e(r,t);return n=!1,t=r,i?r:a})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,n=(e=>e)){const r=(...e)=>i.fire(n(...e)),i=new I({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event},e.fromDOMEventEmitter=function(e,t,n=(e=>e)){const r=(...e)=>i.fire(n(...e)),i=new I({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event},e.toPromise=function(e){return new Promise((t=>n(e)(t)))},e.fromPromise=function(e){const t=new I;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.forward=function(e,t){return e((e=>t.fire(e)))},e.runAndSubscribe=function(e,t,n){return t(n),e((e=>t(e)))};class u{constructor(e,n){this._observable=e,this._counter=0,this._hasChanged=!1;const r={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};n||t(),this.emitter=new I(r),n&&n.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new u(e,t).emitter.event},e.fromObservableLight=function(e){return(t,n,r)=>{let i=0,s=!1;const o={beginUpdate(){i++},endUpdate(){i--,0===i&&(e.reportChanges(),s&&(s=!1,t.call(n)))},handlePossibleChange(){},handleChange(){s=!0}};e.addObserver(o),e.reportChanges();const a={dispose(){e.removeObserver(o)}};return r instanceof _?r.add(a):Array.isArray(r)&&r.push(a),a}}}(x||(x={}));class E{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${E._idPool++}`,E.all.add(this)}start(e){this._stopWatch=new N,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}class A{static{this._idPool=1}constructor(e,t,n=(A._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,r]of this._stacks)(!e||t{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],n=new T(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||i)(n),C.None}if(this._disposed)return C.None;t&&(e=e.bind(t));const r=new M(e);let s;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(r.stack=k.create(),s=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof M?(this._deliveryQueue??=new P,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;const o=v((()=>{O?.unregister(o),s?.(),this._removeListener(r)}));if(n instanceof _?n.add(o):Array.isArray(n)&&n.push(o),O){const e=(new Error).stack.split("\n").slice(2,3).join("\n").trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);O.register(o,t?.[2]??e,o)}return o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)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--,t[n]=void 0;const r=this._deliveryQueue.current===this;if(2*this._size<=t.length){let e=0;for(let n=0;n0}}class P{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}Object.prototype.hasOwnProperty;function F(e){const t=[];for(const n of function(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}(e))"function"==typeof e[n]&&t.push(n);return t}function V(){return globalThis._VSCODE_NLS_LANGUAGE}const D="object"==typeof globalThis?globalThis:"object"==typeof window?window:"object"==typeof self?self:global,q="pseudo"===V()||"undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function K(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const r=n[0],i=t[r];let s=e;return"string"==typeof i?s=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(s=String(i)),s})),q&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function U(e,t,n,...r){const i="object"==typeof t?t.key:t;let s=((t=((D.MonacoEnvironment||{}).Locale||{}).data||{})[e]||{})[i];s||(s=n),r=[];for(let e=3;e=0,z=j.indexOf("Macintosh")>=0,Z=(j.indexOf("Macintosh")>=0||j.indexOf("iPad")>=0||j.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=j.indexOf("Linux")>=0,ee=j?.indexOf("Mobi")>=0,X=!0,te=V()||B,$=navigator.language.toLowerCase(),ne=$);let le=0;z?le=1:W?le=3:H&&(le=2);const ue=W,ce=z,he=(X&&"function"==typeof ie.importScripts&&ie.origin,j),de="function"==typeof ie.postMessage&&!ie.importScripts;(()=>{if(de){const e=[];ie.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n{const r=++t;e.push({id:r,callback:n}),ie.postMessage({vscodeScheduleAsyncWork:r},"*")}}})();const fe=!!(he&&he.indexOf("Chrome")>=0);he&&he.indexOf("Firefox"),!fe&&he&&he.indexOf("Safari"),he&&he.indexOf("Edg/"),he&&he.indexOf("Android");function me(e){return e}class ge{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=me):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class pe{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function be(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function ye(e){return e>=65&&e<=90}function ve(e){return 55296<=e&&e<=56319}function _e(e){return 56320<=e&&e<=57343}function Ce(e,t){return t-56320+(e-55296<<10)+65536}function Se(e,t,n){const r=e.charCodeAt(n);if(ve(r)&&n+1t[3*r+1]))return t[3*r+2];2*r+1}return 0}}class Ne{static{this.ambiguousCharacterData=new pe((()=>JSON.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 ge({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&e in r));0===s.length&&(s=["_default"]);for(const e of s){i=n(i,t(r[e]))}const o=function(e,t){const n=new Map(e);for(const[e,r]of t)n.set(e,r);return n}(t(r._common),i);return new Ne(o)}))}static getInstance(e){return Ne.cache.get(Array.from(e))}static{this._locales=new pe((()=>Object.keys(Ne.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return Ne._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class xe{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(xe.getRawData())),this._data}static isInvisibleCharacter(e){return xe.getData().has(e)}static get codePoints(){return xe.getData()}}const Ee="$initialize";let Ae;class ke{constructor(e,t,n,r){this.vsWorker=e,this.req=t,this.method=n,this.args=r,this.type=0}}class Re{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}}class Te{constructor(e,t,n,r){this.vsWorker=e,this.req=t,this.eventName=n,this.arg=r,this.type=2}}class Me{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class Oe{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class Ie{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const n=String(++this._lastSentReq);return new Promise(((r,i)=>{this._pendingReplies[n]={resolve:r,reject:i},this._send(new ke(this._workerId,n,e,t))}))}listen(e,t){let n=null;const r=new I({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,r),this._send(new Te(this._workerId,n,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new Oe(this._workerId,n)),n=null}});return r.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new Re(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=s(e.detail)),this._send(new Re(this._workerId,t,void 0,s(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new Me(this._workerId,t,e))}));this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;nfunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},i=e=>function(t){return n(e,t)},s={};for(const t of e)Fe(t)?s[t]=i(t):Pe(t)?s[t]=n(t,void 0):s[t]=r(t);return s}class De{constructor(e,t){this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new Ie({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t)=>this._handleMessage(e,t),handleEvent:(e,t)=>this._handleEvent(e,t)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t){if(e===Ee)return this.initialize(t[0],t[1],t[2],t[3]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return Promise.reject(e)}}_handleEvent(e,t){if(!this._requestHandler)throw new Error("Missing requestHandler");if(Fe(e)){const n=this._requestHandler[e].call(this._requestHandler,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on request handler.`);return n}if(Pe(e)){const t=this._requestHandler[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on request handler.`);return t}throw new Error(`Malformed event name ${e}`)}initialize(e,t,n,r){this._protocol.setWorkerId(e);const i=Ve(r,((e,t)=>this._protocol.sendMessage(e,t)),((e,t)=>this._protocol.listen(e,t)));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(i),Promise.resolve(F(this._requestHandler))):(t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,void 0!==t.trustedTypesPolicy&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t)),new Promise(((e,t)=>{(0,globalThis.require)([n],(n=>{this._requestHandler=n.create(i),this._requestHandler?e(F(this._requestHandler)):t(new Error("No RequestHandler!"))}),t)})))}}class qe{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function Ke(e,t){return(t<<5)-t+e|0}function Ue(e,t){t=Ke(149417,t);for(let n=0,r=e.length;n>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}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()),toHexString(this._h0)+toHexString(this._h1)+toHexString(this._h2)+toHexString(this._h3)+toHexString(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,fill(this._buff,this._buffLen),this._buffLen>56&&(this._step(),fill(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=Be._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,leftRotate(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,r,i,s=this._h0,o=this._h1,a=this._h2,l=this._h3,u=this._h4;for(let t=0;t<80;t++)t<20?(o&a|~o&l,1518500249):t<40?(o^a^l,1859775393):t<60?(o&a|o&l|a&l,2400959708):(o^a^l,3395469782),leftRotate(s,5)+n+u+r+e.getUint32(4*t,!1)&4294967295,l,a,leftRotate(o,30),s,i;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+u&4294967295}}class $e{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new qe(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),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 Ge{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[r,i,s]=Ge._getElements(e),[o,a,l]=Ge._getElements(t);this._hasStrings=s&&l,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(Ge._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,r=t.length;n=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){let i;return n<=r?(We.Assert(e===t+1,"originalStart should only be one more than originalEnd"),i=[new qe(e,0,n,r-n+1)]):e<=t?(We.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),i=[new qe(e,t-e+1,n,0)]):(We.Assert(e===t+1,"originalStart should only be one more than originalEnd"),We.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),i=[]),i}const s=[0],o=[0],a=this.ComputeRecursionPoint(e,t,n,r,s,o,i),l=s[0],u=o[0];if(null!==a)return a;if(!i[0]){const s=this.ComputeDiffRecursive(e,l,n,u,i);let o=[];return o=i[0]?[new qe(l+1,t-(l+1)+1,u+1,r-(u+1)+1)]:this.ComputeDiffRecursive(l+1,t,u+1,r,i),this.ConcatenateChanges(s,o)}return[new qe(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,i,s,o,a,l,u,c,h,d,f,m,g,p,b){let y=null,v=null,_=new He,C=t,S=n,w=d[0]-g[0]-r,L=-1073741824,N=this.m_forwardHistory.length-1;do{const t=w+e;t===C||t=0&&(e=(l=this.m_forwardHistory[N])[0],C=1,S=l.length-1)}while(--N>=-1);if(y=_.getReverseChanges(),b[0]){let e=d[0]+1,t=g[0]+1;if(null!==y&&y.length>0){const n=y[y.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}v=[new qe(e,h-e+1,t,m-t+1)]}else{_=new He,C=s,S=o,w=d[0]-g[0]-a,L=1073741824,N=p?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=w+i;e===C||e=u[e+1]?(f=(c=u[e+1]-1)-w-a,c>L&&_.MarkNextChange(),L=c+1,_.AddOriginalElement(c+1,f+1),w=e+1-i):(f=(c=u[e-1])-w-a,c>L&&_.MarkNextChange(),L=c,_.AddModifiedElement(c+1,f+1),w=e-1-i),N>=0&&(i=(u=this.m_reverseHistory[N])[0],C=1,S=u.length-1)}while(--N>=-1);v=_.getChanges()}return this.ConcatenateChanges(y,v)}ComputeRecursionPoint(e,t,n,r,i,s,o){let a=0,l=0,u=0,c=0,h=0,d=0;e--,n--,i[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(r-n),m=f+1,g=new Int32Array(m),p=new Int32Array(m),b=r-n,y=t-e,v=e-n,_=t-r,C=(y-b)%2==0;g[b]=e,p[y]=t,o[0]=!1;for(let S=1;S<=f/2+1;S++){let f=0,w=0;u=this.ClipDiagonalBound(b-S,S,b,m),c=this.ClipDiagonalBound(b+S,S,b,m);for(let e=u;e<=c;e+=2){a=e===u||ef+w&&(f=a,w=l),!C&&Math.abs(e-y)<=S-1&&a>=p[e])return i[0]=a,s[0]=l,n<=p[e]&&S<=1448?this.WALKTRACE(b,u,c,v,y,h,d,_,g,p,a,t,i,l,r,s,C,o):null}const L=(f-e+(w-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(f,L))return o[0]=!0,i[0]=f,s[0]=w,L>0&&S<=1448?this.WALKTRACE(b,u,c,v,y,h,d,_,g,p,a,t,i,l,r,s,C,o):(e++,n++,[new qe(e,t-e+1,n,r-n+1)]);h=this.ClipDiagonalBound(y-S,S,y,m),d=this.ClipDiagonalBound(y+S,S,y,m);for(let f=h;f<=d;f+=2){a=f===h||f=p[f+1]?p[f+1]-1:p[f-1],l=a-(f-y)-_;const m=a;for(;a>e&&l>n&&this.ElementsAreEqual(a,l);)a--,l--;if(p[f]=a,C&&Math.abs(f-b)<=S&&a<=g[f])return i[0]=a,s[0]=l,m>=g[f]&&S<=1448?this.WALKTRACE(b,u,c,v,y,h,d,_,g,p,a,t,i,l,r,s,C,o):null}if(S<=1447){let e=new Int32Array(c-u+2);e[0]=b-u+1,ze.Copy2(g,u,e,1,c-u+1),this.m_forwardHistory.push(e),e=new Int32Array(d-h+2),e[0]=y-h+1,ze.Copy2(p,h,e,1,d-h+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,u,c,v,y,h,d,_,g,p,a,t,i,l,r,s,C,o)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let r=0,i=0;if(t>0){const n=e[t-1];r=n.originalStart+n.originalLength,i=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,u=n.modifiedStart-e;if(tl&&(l=c,a=e)}n.originalStart-=a,n.modifiedStart-=a;const u=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],u)&&(e[t-1]=u[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&n>a&&(a=n,l=t,u=e)}return a>0?[l,u]:null}_contiguousSequenceScore(e,t,n){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const r=new Array(e.length+t.length-1);return ze.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],ze.Copy(t,1,r,e.length,t.length-1),r}{const n=new Array(e.length+t.length);return ze.Copy(e,0,n,0,e.length),ze.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(We.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),We.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let i=e.originalLength;const s=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(o=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new qe(r,i,s,o),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,r){if(e>=0&&e=65&&e<=90||e>=97&&e<=122}function ut(e,t,n,r){let i="",s=0,o=-1,a=0,l=0;for(let u=0;u<=e.length;++u){if(u2){const e=i.lastIndexOf(n);-1===e?(i="",s=0):(i=i.slice(0,e),s=i.length-1-i.lastIndexOf(n)),o=u,a=0;continue}if(0!==i.length){i="",s=0,o=u,a=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,u)}`:i=e.slice(o+1,u),s=u-o-1;o=u,a=0}else l===Ye&&-1!==a?++a:a=-1}return i}function ct(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new rt(t,"Object",e)}(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${i=t.ext,i?`${"."===i[0]?"":"."}${i}`:""}`;var i;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ht={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],it(s,`paths[${i}]`),0===s.length)continue}else 0===t.length?s=Xe():(s=Qe[`=${t}`]||Xe(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===tt)&&(s=`${t}\\`));const o=s.length;let a=0,l="",u=!1;const c=s.charCodeAt(0);if(1===o)ot(c)&&(a=1,u=!0);else if(ot(c))if(u=!0,ot(s.charCodeAt(1))){let e=2,t=e;for(;e2&&ot(s.charCodeAt(2))&&(u=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(r){if(t.length>0)break}else if(n=`${s.slice(a)}\\${n}`,r=u,u&&t.length>0)break}return n=ut(n,!r,"\\",ot),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){it(e,"path");const t=e.length;if(0===t)return".";let n,r=0,i=!1;const s=e.charCodeAt(0);if(1===t)return at(s)?"\\":e;if(ot(s))if(i=!0,ot(e.charCodeAt(1))){let i=2,s=i;for(;i2&&ot(e.charCodeAt(2))&&(i=!0,r=3));let o=r0&&ot(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?i?`\\${o}`:o:i?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){it(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return ot(n)||t>2&<(n)&&e.charCodeAt(1)===nt&&ot(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let r=0;r0&&(void 0===t?t=n=i:t+=`\\${i}`)}if(void 0===t)return".";let r=!0,i=0;if("string"==typeof n&&ot(n.charCodeAt(0))){++i;const e=n.length;e>1&&ot(n.charCodeAt(1))&&(++i,e>2&&(ot(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ht.normalize(t)},relative(e,t){if(it(e,"from"),it(t,"to"),e===t)return"";const n=ht.resolve(e),r=ht.resolve(t);if(n===r)return"";if((e=n.toLowerCase())===(t=r.toLowerCase()))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===tt;)s--;const o=s-i;let a=0;for(;aa&&t.charCodeAt(l-1)===tt;)l--;const u=l-a,c=oc){if(t.charCodeAt(a+d)===tt)return r.slice(a+d+1);if(2===d)return r.slice(a+d)}o>c&&(e.charCodeAt(i+d)===tt?h=d:2===d&&(h=3)),-1===h&&(h=0)}let f="";for(d=i+h+1;d<=s;++d)d!==s&&e.charCodeAt(d)!==tt||(f+=0===f.length?"..":"\\..");return a+=h,f.length>0?`${f}${r.slice(a,l)}`:(r.charCodeAt(a)===tt&&++a,r.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=ht.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===tt){if(t.charCodeAt(1)===tt){const e=t.charCodeAt(2);if(63!==e&&e!==Ye)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(lt(t.charCodeAt(0))&&t.charCodeAt(1)===nt&&t.charCodeAt(2)===tt)return`\\\\?\\${t}`;return e},dirname(e){it(e,"path");const t=e.length;if(0===t)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(1===t)return ot(i)?e:".";if(ot(i)){if(n=r=1,ot(e.charCodeAt(1))){let i=2,s=i;for(;i2&&ot(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let n=t-1;n>=r;--n)if(ot(e.charCodeAt(n))){if(!o){s=n;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&it(t,"suffix"),it(e,"path");let n,r=0,i=-1,s=!0;if(e.length>=2&<(e.charCodeAt(0))&&e.charCodeAt(1)===nt&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=r;--n){const l=e.charCodeAt(n);if(ot(l)){if(!s){r=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(i=n):(o=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(ot(e.charCodeAt(n))){if(!s){r=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){it(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===nt&<(e.charCodeAt(0))&&(t=r=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(ot(t)){if(!s){r=a+1;break}}else-1===i&&(s=!1,i=a+1),t===Ye?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:ct.bind(null,"\\"),parse(e){it(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(1===n)return ot(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(ot(i)){if(r=1,ot(e.charCodeAt(1))){let t=2,i=t;for(;t0&&(t.root=e.slice(0,r));let s=-1,o=r,a=-1,l=!0,u=e.length-1,c=0;for(;u>=r;--u)if(i=e.charCodeAt(u),ot(i)){if(!l){o=u+1;break}}else-1===a&&(l=!1,a=u+1),i===Ye?-1===s?s=u:1!==c&&(c=1):-1!==s&&(c=-1);return-1!==a&&(-1===s||0===c||1===c&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==r?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},dt=(()=>{if(st){const e=/\\/g;return()=>{const t=Xe().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Xe()})(),ft={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:dt();it(i,`paths[${r}]`),0!==i.length&&(t=`${i}/${t}`,n=i.charCodeAt(0)===et)}return t=ut(t,!n,"/",at),n?`/${t}`:t.length>0?t:"."},normalize(e){if(it(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===et,n=e.charCodeAt(e.length-1)===et;return 0===(e=ut(e,!t,"/",at)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return it(e,"path"),e.length>0&&e.charCodeAt(0)===et},join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=r:t+=`/${r}`)}return void 0===t?".":ft.normalize(t)},relative(e,t){if(it(e,"from"),it(t,"to"),e===t)return"";if((e=ft.resolve(e))===(t=ft.resolve(t)))return"";const n=e.length,r=n-1,i=t.length-1,s=rs){if(t.charCodeAt(1+a)===et)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else r>s&&(e.charCodeAt(1+a)===et?o=a:0===a&&(o=0));let l="";for(a=1+o+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==et||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+o)}`},toNamespacedPath(e){return e},dirname(e){if(it(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===et;let n=-1,r=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===et){if(!r){n=t;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&it(t,"ext"),it(e,"path");let n,r=0,i=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===et){if(!s){r=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(i=n):(o=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===et){if(!s){r=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){it(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==et)-1===r&&(i=!1,r=o+1),a===Ye?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===s||1===s&&t===r-1&&t===n+1?"":e.slice(t,r)},format:ct.bind(null,"/"),parse(e){it(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===et;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,l=e.length-1,u=0;for(;l>=r;--l){const t=e.charCodeAt(l);if(t!==et)-1===o&&(a=!1,o=l+1),t===Ye?-1===i?i=l:1!==u&&(u=1):-1!==i&&(u=-1);else if(!a){s=l+1;break}}if(-1!==o){const r=0===s&&n?1:s;-1===i||0===u||1===u&&i===o-1&&i===s+1?t.base=t.name=e.slice(r,o):(t.name=e.slice(r,i),t.base=e.slice(r,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ft.win32=ht.win32=ht,ft.posix=ht.posix=ft;st?ht.normalize:ft.normalize,st?ht.resolve:ft.resolve,st?ht.relative:ft.relative,st?ht.dirname:ft.dirname,st?ht.basename:ft.basename,st?ht.extname:ft.extname,st?ht.sep:ft.sep;const mt=/^\w[\w\d+.-]*$/,gt=/^\//,pt=/^\/\//;const bt="",yt="/",vt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class _t{static isUri(e){return e instanceof _t||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||bt,this.authority=e.authority||bt,this.path=e.path||bt,this.query=e.query||bt,this.fragment=e.fragment||bt):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||bt,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==yt&&(t=yt+t):t=yt}return t}(this.scheme,n||bt),this.query=r||bt,this.fragment=i||bt,function(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&&!mt.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!gt.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(pt.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 ("//")')}(this,s))}get fsPath(){return xt(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=bt),void 0===n?n=this.authority:null===n&&(n=bt),void 0===r?r=this.path:null===r&&(r=bt),void 0===i?i=this.query:null===i&&(i=bt),void 0===s?s=this.fragment:null===s&&(s=bt),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new St(t,n,r,i,s)}static parse(e,t=!1){const n=vt.exec(e);return n?new St(n[2]||bt,Rt(n[4]||bt),Rt(n[5]||bt),Rt(n[7]||bt),Rt(n[9]||bt),t):new St(bt,bt,bt,bt,bt)}static file(e){let t=bt;if(ue&&(e=e.replace(/\\/g,yt)),e[0]===yt&&e[1]===yt){const n=e.indexOf(yt,2);-1===n?(t=e.substring(2),e=yt):(t=e.substring(2,n),e=e.substring(n)||yt)}return new St("file",t,e,bt,bt)}static from(e,t){return new St(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=ue&&"file"===e.scheme?_t.file(ht.join(xt(e,!0),...t)).path:ft.join(e.path,...t),e.with({path:n})}toString(e=!1){return Et(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof _t)return e;{const t=new St(e);return t._formatted=e.external??null,t._fsPath=e._sep===Ct?e.fsPath??null:null,t}}return e}}const Ct=ue?1:void 0;class St extends _t{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=xt(this,!1)),this._fsPath}toString(e=!1){return e?Et(this,!0):(this._formatted||(this._formatted=Et(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Ct),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const wt={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 Lt(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=wt[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function Nt(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,ue&&(n=n.replace(/\//g,"\\")),n}function Et(e,t){const n=t?Nt:Lt;let r="",{scheme:i,authority:s,path:o,query:a,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=yt,r+=yt),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),l&&(r+="#",r+=t?l:Lt(l,!1,!1)),r}function At(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+At(e.substr(3)):e}}const kt=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Rt(e){return e.match(kt)?e.replace(kt,(e=>At(e))):e}class Tt{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Tt(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Tt.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Tt.isBefore(this,e)}static isBefore(e,t){return e.lineNumbern||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}isEmpty(){return Mt.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Mt.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return Mt.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return Mt.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return Mt.plusRange(this,e)}static plusRange(e,t){let n,r,i,s;return t.startLineNumbere.endLineNumber?(i=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(i=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(i=e.endLineNumber,s=e.endColumn),new Mt(n,r,i,s)}intersectRanges(e){return Mt.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,s=e.endColumn;const o=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,u=t.endColumn;return nl?(i=l,s=u):i===l&&(s=Math.min(s,u)),n>i||n===i&&r>s?null:new Mt(n,r,i,s)}equalsRange(e){return Mt.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Mt.getEndPosition(this)}static getEndPosition(e){return new Tt(e.endLineNumber,e.endColumn)}getStartPosition(){return Mt.getStartPosition(this)}static getStartPosition(e){return new Tt(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Mt(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Mt(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Mt.collapseToStart(this)}static collapseToStart(e){return new Mt(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Mt.collapseToEnd(this)}static collapseToEnd(e){return new Mt(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Mt(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new Mt(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Mt(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}var Ot;function It(e,t){return(n,r)=>t(e(n),e(r))}!function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(Ot||(Ot={}));const Pt=(e,t)=>e-t;class Ft{static{this.empty=new Ft((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new Ft((t=>this.iterate((n=>!e(n)||t(n)))))}map(e){return new Ft((t=>this.iterate((n=>t(e(n))))))}findLast(e){let t;return this.iterate((n=>(e(n)&&(t=n),!0))),t}findLastMaxBy(e){let t,n=!0;return this.iterate((r=>((n||Ot.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0))),t}}function Vt(e){return e<0?0:e>255?255:0|e}function Dt(e){return e<0?0:e>4294967295?4294967295:0|e}class qt{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Dt(e);const n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Dt(e),t=Dt(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Dt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,s=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],s=i-this.values[r],e=i))break;t=r+1}return new Kt(r,e-s)}}class Kt{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class Ut{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new Tt(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;r/?")e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}();function $t(e){let t=Bt;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 jt=new w;function Wt(e,t,n,r,i){if(t=$t(t),i||(i=d.first(jt)),n.length>i.maxLen){let s=e-i.maxLen/2;return s<0?s=0:r+=s,Wt(e,t,n=n.substring(s,e+i.maxLen/2),r,i)}const s=Date.now(),o=e-1-r;let a=-1,l=null;for(let e=1;!(Date.now()-s>=i.timeBudget);e++){const r=o-i.windowSize*e;t.lastIndex=Math.max(0,r);const s=zt(t,n,o,a);if(!s&&l)break;if(l=s,r<=0)break;a=r}if(l){const e={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function zt(e,t,n,r){let i;for(;i=e.exec(t);){const t=i.index||0;if(t<=n&&e.lastIndex>=n)return i;if(r>0&&t>r)return null}return null}jt.unshift({maxLen:1e3,windowSize:15,timeBudget:150});class Ht{constructor(e){const t=Vt(e);this._defaultValue=t,this._asciiMap=Ht._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=Vt(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Gt{constructor(e,t,n){const r=new Uint8Array(e*t);for(let i=0,s=e*t;it&&(t=s),i>n&&(n=i),o>n&&(n=o)}t++,n++;const r=new Gt(n,t,0);for(let t=0,n=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let Xt=null;let Qt=null;class Zt{static _createLink(e,t,n,r,i){let s=i-1;do{const n=t.charCodeAt(s);if(2!==e.get(n))break;s--}while(s>r);if(r>0){const e=t.charCodeAt(r-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:s+2},url:t.substring(r,s+1)}}static computeLinks(e,t=function(){return null===Xt&&(Xt=new Jt([[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]])),Xt}()){const n=function(){if(null===Qt){Qt=new Ht(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}}const en=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var tn;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof nn||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:x.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:en})}(tn||(tn={}));class nn{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?en:(this._emitter||(this._emitter=new I),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class rn{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new nn),this._token}cancel(){this._token?this._token instanceof nn&&this._token.cancel():this._token=tn.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof nn&&this._token.dispose():this._token=tn.None}}class sn{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const on=new sn,an=new sn,ln=new sn,un=new Array(230),cn={},hn=[],dn=Object.create(null),fn=Object.create(null),mn=[],gn=[];for(let e=0;e<=193;e++)mn[e]=-1;for(let e=0;e<=132;e++)gn[e]=-1;var pn;!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],r=[];for(const e of t){const[t,i,s,o,a,l,u,c,h]=e;if(r[i]||(r[i]=!0,hn[i]=s,dn[s]=i,fn[s.toLowerCase()]=i,t&&(mn[i]=o,0!==o&&3!==o&&5!==o&&4!==o&&6!==o&&57!==o&&(gn[o]=i))),!n[o]){if(n[o]=!0,!a)throw new Error(`String representation missing for key code ${o} around scan code ${s}`);on.define(o,a),an.define(o,c||a),ln.define(o,h||c||a)}l&&(un[l]=o),u&&(cn[u]=o)}gn[3]=46}(),function(e){e.toString=function(e){return on.keyCodeToStr(e)},e.fromString=function(e){return on.strToKeyCode(e)},e.toUserSettingsUS=function(e){return an.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return ln.keyCodeToStr(e)},e.fromUserSettings=function(e){return an.strToKeyCode(e)||ln.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return on.keyCodeToStr(e)}}(pn||(pn={}));class bn extends Mt{constructor(e,t,n,r){super(e,t,n,r),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return bn.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new bn(this.startLineNumber,this.startColumn,e,t):new bn(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Tt(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Tt(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new bn(e,t,this.endLineNumber,this.endColumn):new bn(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new bn(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new bn(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new bn(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new bn(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new Sn(this,e,t);return this._factories.set(e,n),v((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,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}};var Fn,Vn,Dn,qn,Kn,Un,Bn,$n,jn,Wn,zn,Hn,Gn,Jn,Xn,Qn,Zn,Yn,er,tr,nr,rr,ir,sr,or,ar,lr,ur,cr,hr,dr,fr,mr,gr,pr,br,yr,vr,_r,Cr,Sr,wr,Lr,Nr,xr,Er,Ar,kr;!function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(Fn||(Fn={})),function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(Vn||(Vn={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(Dn||(Dn={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(qn||(qn={})),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"}(Kn||(Kn={})),function(e){e[e.Deprecated=1]="Deprecated"}(Un||(Un={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(Bn||(Bn={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}($n||($n={})),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"}(jn||(jn={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(Wn||(Wn={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(zn||(zn={})),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"}(Hn||(Hn={})),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"}(Gn||(Gn={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(Jn||(Jn={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(Xn||(Xn={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(Qn||(Qn={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(Zn||(Zn={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Yn||(Yn={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(er||(er={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(tr||(tr={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(nr||(nr={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(rr||(rr={})),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"}(ir||(ir={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(sr||(sr={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(or||(or={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(ar||(ar={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(lr||(lr={})),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"}(ur||(ur={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(cr||(cr={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(hr||(hr={})),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"}(dr||(dr={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(fr||(fr={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(mr||(mr={})),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"}(gr||(gr={})),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"}(pr||(pr={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(br||(br={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(yr||(yr={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(vr||(vr={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(_r||(_r={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(Cr||(Cr={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(Sr||(Sr={})),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"}(wr||(wr={})),function(e){e[e.Deprecated=1]="Deprecated"}(Lr||(Lr={})),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"}(Nr||(Nr={})),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"}(xr||(xr={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(Er||(Er={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(Ar||(Ar={}));class Rr{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return function(e,t){return(e|(65535&t)<<16>>>0)>>>0}(e,t)}}class Tr{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[_a]="ResourceMap",e instanceof Tr)this.map=new Map(e.map),this.toKey=t??Tr.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=t??Tr.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??Tr.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new ResourceMapEntry(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&e.bind(t);for(const[t,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class Mr{constructor(){this[kr]="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(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,0!==n&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:case 2:default:this.addItemLast(r);break;case 1:this.addItemFirst(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}[(kr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class Or extends Mr{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class Ir{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}new class extends Or{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}(10);var Pr,Fr,Vr;!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(Pr||(Pr={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(Fr||(Fr={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(Vr||(Vr={}));function Dr(e,t,n,r,i){return function(e,t,n,r,i){if(0===r)return!0;const s=t.charCodeAt(r-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(i>0){const n=t.charCodeAt(r);if(0!==e.get(n))return!0}return!1}(e,t,0,r,i)&&function(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(i>0){const n=t.charCodeAt(r+i-1);if(0!==e.get(n))return!0}return!1}(e,t,n,r,i)}class qr{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const r=n.index,i=n[0].length;if(r===this._prevMatchStartIndex&&i===this._prevMatchLength){if(0===i){Se(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=i,!this._wordSeparators||Dr(this._wordSeparators,e,t,r,i))return n}while(n);return null}}function Kr(e,t="Unreachable"){throw new Error(t)}function Ur(e){e()||(e(),i(new c("Assertion Failed")))}function Br(e,t){let n=0;for(;nString.fromCodePoint(e))).join(""))}]`,"g");const l=new qr(null,a),u=[];let c,h=!1,d=0,f=0,m=0;e:for(let t=r,n=i;t<=n;t++){const n=e.getLineContent(t),r=n.length;l.reset(0);do{if(c=l.next(n),c){let e=c.index,i=c.index+c[0].length;if(e>0){ve(n.charCodeAt(e-1))&&e--}if(i+1=n){h=!0;break e}u.push(new Mt(t,e+1,t,i+1))}}}while(c)}return{ranges:u,hasMore:h,ambiguousCharacterCount:d,invisibleCharacterCount:f,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(e,t){const n=new jr(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),i=n.ambiguousCharacters.getPrimaryConfusable(r),s=Ne.getLocales().filter((e=>!Ne.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(r)));return{kind:0,confusableWith:String.fromCodePoint(i),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class jr{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Ne.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of xe.codePoints)Wr(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,i=!1;if(t)for(const e of t){const t=e.codePointAt(0),n=(s=e,we.test(s));r=r||n,n||this.ambiguousCharacters.isAmbiguous(t)||xe.isInvisibleCharacter(t)||(i=!0)}var s;return!r&&i?0:this.options.invisibleCharacters&&!Wr(e)&&xe.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function Wr(e){return" "===e||"\n"===e||"\t"===e}class zr{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class Hr{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class Gr{static addRange(e,t){let n=0;for(;nt))return new Gr(e,t)}static ofLength(e){return new Gr(0,e)}static ofStartAndLength(e,t){return new Gr(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new c(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Gr(this.start+e,this.endExclusive+e)}deltaStart(e){return new Gr(this.start+e,this.endExclusive)}deltaEnd(e){return new Gr(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new c(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new c(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;tt)throw new c(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),n=Xr(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const r=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,r)}}contains(e){const t=Jr(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=Jr(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,r=0,i=null;for(;n=s.startLineNumber?i=new Yr(i.startLineNumber,Math.max(i.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(i),i=s)}return null!==i&&t.push(i),new ei(t)}subtractFrom(e){const t=Qr(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=Xr(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)return new ei([e]);const r=[];let i=e.startLineNumber;for(let e=t;ei&&r.push(new Yr(i,t.startLineNumber)),i=t.endLineNumberExclusive}return ie.toString())).join(", ")}getIntersection(e){const t=[];let n=0,r=0;for(;nt.delta(e))))}}class ti{static{this.zero=new ti(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new ti(0,t.column-e.column):new ti(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return ti.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const r of e)"\n"===r?(t++,n=0):n++;return new ti(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new Mt(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new Mt(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new Tt(e.lineNumber,e.column+this.columnCount):new Tt(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}class ni{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class ri{static inverse(e,t,n){const r=[];let i=1,s=1;for(const t of e){const e=new ri(new Yr(i,t.original.startLineNumber),new Yr(s,t.modified.startLineNumber));e.modified.isEmpty||r.push(e),i=t.original.endLineNumberExclusive,s=t.modified.endLineNumberExclusive}const o=new ri(new Yr(i,t+1),new Yr(s,n+1));return o.modified.isEmpty||r.push(o),r}static clip(e,t,n){const r=[];for(const i of e){const e=i.original.intersect(t),s=i.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&r.push(new ri(e,s))}return r}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ri(this.modified,this.original)}join(e){return new ri(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new ai(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new c("not a valid diff");return new ai(new Mt(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Mt(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new ai(new Mt(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new Mt(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(si(this.original.endLineNumberExclusive,e)&&si(this.modified.endLineNumberExclusive,t))return new ai(new Mt(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Mt(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ai(Mt.fromPositions(new Tt(this.original.startLineNumber,1),ii(new Tt(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),Mt.fromPositions(new Tt(this.modified.startLineNumber,1),ii(new Tt(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ai(Mt.fromPositions(ii(new Tt(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),ii(new Tt(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),Mt.fromPositions(ii(new Tt(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),ii(new Tt(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new c}}function ii(e,t){if(e.lineNumber<1)return new Tt(1,1);if(e.lineNumber>t.length)return new Tt(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new Tt(e.lineNumber,n.length+1):e}function si(e,t){return e>=1&&e<=t.length}class oi extends ri{static fromRangeMappings(e){const t=Yr.join(e.map((e=>Yr.fromRangeInclusive(e.originalRange)))),n=Yr.join(e.map((e=>Yr.fromRangeInclusive(e.modifiedRange))));return new oi(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new oi(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new oi(this.original,this.modified,[this.toRangeMapping()])}}class ai{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new ai(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new ni(this.originalRange,t)}}class li{computeDiff(e,t,n){const r=new mi(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),i=[];let s=null;for(const e of r.changes){let t,n;t=0===e.originalEndLineNumber?new Yr(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new Yr(e.originalStartLineNumber,e.originalEndLineNumber+1),n=0===e.modifiedEndLineNumber?new Yr(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new Yr(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let r=new oi(t,n,e.charChanges?.map((e=>new ai(new Mt(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new Mt(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));s&&(s.modified.endLineNumberExclusive!==r.modified.startLineNumber&&s.original.endLineNumberExclusive!==r.original.startLineNumber||(r=new oi(s.original.join(r.original),s.modified.join(r.modified),s.innerChanges&&r.innerChanges?s.innerChanges.concat(r.innerChanges):void 0),i.pop())),i.push(r),s=r}return Ur((()=>Br(i,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class di{constructor(e,t,n,r,i,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=r,this.modifiedStartLineNumber=i,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const r=t.getStartLineNumber(e.originalStart),i=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),u=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),c=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new di(r,i,s,o,a,l,u,c)}}class fi{constructor(e,t,n,r,i){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=r,this.charChanges=i}static createFromDiffResult(e,t,n,r,i,s,o){let a,l,u,c,h;if(0===t.originalLength?(a=n.getStartLineNumber(t.originalStart)-1,l=0):(a=n.getStartLineNumber(t.originalStart),l=n.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(u=r.getStartLineNumber(t.modifiedStart)-1,c=0):(u=r.getStartLineNumber(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&i()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=r.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=ui(s,a,i,!0).changes;o&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r1&&o>1;){if(e.charCodeAt(n-2)!==t.charCodeAt(o-2))break;n--,o--}(n>1||o>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,n,s+1,1,o)}{let n=pi(e,1),o=pi(t,1);const a=e.length+1,l=t.length+1;for(;n=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}(e);return-1===n?t:n+2}function bi(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t{n.push(vi.fromOffsetPairs(e?e.getEndExclusives():_i.zero,r?r.getStarts():new _i(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),n}static fromOffsetPairs(e,t){return new vi(new Gr(e.offset1,t.offset1),new Gr(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new c("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new vi(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new vi(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new vi(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new vi(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new vi(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new vi(t,n)}getStarts(){return new _i(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new _i(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class _i{static{this.zero=new _i(0,0)}static{this.max=new _i(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new _i(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class Ci{static{this.instance=new Ci}isValid(){return!0}}class Si{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new c("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&l>0&&3===s.get(a-1,l-1)&&(h+=o.get(a-1,l-1)),h+=r?r(a,l):1):h=-1;const d=Math.max(u,c,h);if(d===h){const e=a>0&&l>0?o.get(a-1,l-1):0;o.set(a,l,e+1),s.set(a,l,3)}else d===u?(o.set(a,l,0),s.set(a,l,1)):d===c&&(o.set(a,l,0),s.set(a,l,2));i.set(a,l,d)}const a=[];let l=e.length,u=t.length;function c(e,t){e+1===l&&t+1===u||a.push(new vi(new Gr(e+1,l),new Gr(t+1,u))),l=e,u=t}let h=e.length-1,d=t.length-1;for(;h>=0&&d>=0;)3===s.get(h,d)?(c(h,d),h--,d--):1===s.get(h,d)?h--:d--;return c(-1,-1),a.reverse(),new yi(a,!1)}}class Ei{compute(e,t,n=Ci.instance){if(0===e.length||0===t.length)return yi.trivial(e,t);const r=e,i=t;function s(e,t){for(;er.length||d>i.length)continue;const f=s(h,d);a.set(u,f);const m=h===o?l.get(u+1):l.get(u-1);if(l.set(u,f!==h?new Ai(m,h,d,f-h):m),a.get(u)===r.length&&a.get(u)-u===i.length)break e}}let c=l.get(u);const h=[];let d=r.length,f=i.length;for(;;){const e=c?c.x+c.length:0,t=c?c.y+c.length:0;if(e===d&&t===f||h.push(new vi(new Gr(e,d),new Gr(t,f))),!c)break;d=c.x,f=c.y,c=c.prev}return h.reverse(),new yi(h,!1)}}class Ai{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}}class ki{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class Ri{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class Ti{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let r=e[t-1],i=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(i=this.range.startColumn-1,r=r.substring(i)),this.lineStartOffsets.push(i);let s=0;if(!n){const e=r.trimStart();s=r.length-e.length,r=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-i-s,r.length):r.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=Pi(e>0?this.elements[e-1]:-1),n=Pi(et<=e)),r=e-this.firstElementOffsetByLineIdx[n];return new Tt(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(0===r&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?Mt.fromPositions(n,n):Mt.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!Mi(this.elements[e]))return;let t=e;for(;t>0&&Mi(this.elements[t-1]);)t--;let n=e;for(;nt<=e.start))??0,n=function(e,t){const n=Qr(e,t);return n===e.length?void 0:e[n]}(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new Gr(t,n)}}function Mi(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const Oi={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Ii(e){return Oi[e]}function Pi(e){return 10===e?8:13===e?7:Li(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function Fi(e,t,n,r,i,s){let{moves:o,excludedChanges:a}=function(e,t,n,r){const i=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new Ni(e.original,t,e))),o=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new Ni(e.modified,n,e)))),a=new Set;for(const e of s){let t,n=-1;for(const r of o){const i=e.computeSimilarity(r);i>n&&(n=i,t=r)}if(n>.9&&t&&(o.delete(t),i.push(new ri(e.range,t.range)),a.add(e.source),a.add(t.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}(e,t,n,s);if(!s.isValid())return[];const l=function(e,t,n,r,i,s){const o=[],a=new Ir;for(const n of e)for(let e=n.original.startLineNumber;ee.modified.startLineNumber),Pt));for(const t of e){let e=[];for(let r=t.modified.startLineNumber;r{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===i.endLineNumberExclusive)return n.originalLineRange=new Yr(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new Yr(n.modifiedLineRange.startLineNumber,i.endLineNumberExclusive),void s.push(n);const n={modifiedLineRange:i,originalLineRange:t};l.push(n),s.push(n)})),e=s}if(!s.isValid())return[]}l.sort((u=It((e=>e.modifiedLineRange.length),Pt),(e,t)=>-u(e,t)));var u;const c=new ei,h=new ei;for(const e of l){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,n=c.subtractFrom(e.modifiedLineRange),r=h.subtractFrom(e.originalLineRange).getWithDelta(t),i=n.getIntersection(r);for(const e of i.ranges){if(e.length<3)continue;const n=e,r=e.delta(-t);o.push(new ri(r,n)),c.addRange(n),h.addRange(r)}}o.sort(It((e=>e.original.startLineNumber),Pt));const d=new Zr(e);for(let t=0;te.original.startLineNumber<=n.original.startLineNumber)),l=Jr(e,(e=>e.modified.startLineNumber<=n.modified.startLineNumber)),u=Math.max(n.original.startLineNumber-a.original.startLineNumber,n.modified.startLineNumber-l.modified.startLineNumber),f=d.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumberr.length||t>i.length)break;if(c.contains(t)||h.contains(e))break;if(!Vi(r[e-1],i[t-1],s))break}for(p>0&&(h.addRange(new Yr(n.original.startLineNumber-p,n.original.startLineNumber)),c.addRange(new Yr(n.modified.startLineNumber-p,n.modified.startLineNumber))),b=0;br.length||t>i.length)break;if(c.contains(t)||h.contains(e))break;if(!Vi(r[e-1],i[t-1],s))break}b>0&&(h.addRange(new Yr(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+b)),c.addRange(new Yr(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+b))),(p>0||b>0)&&(o[t]=new ri(new Yr(n.original.startLineNumber-p,n.original.endLineNumberExclusive+b),new Yr(n.modified.startLineNumber-p,n.modified.endLineNumberExclusive+b)))}return o}(e.filter((e=>!a.has(e))),r,i,t,n,s);return function(e,t){for(const n of t)e.push(n)}(o,l),o=function(e){if(0===e.length)return e;e.sort(It((e=>e.original.startLineNumber),Pt));const t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2?t[t.length-1]=r.join(i):t.push(i)}return t}(o),o=o.filter((e=>{const n=e.original.toOffsetRange().slice(t).map((e=>e.trim()));return n.join("\n").length>=15&&function(e,t){let n=0;for(const r of e)t(r)&&n++;return n}(n,(e=>e.length>=2))>=2})),o=function(e,t){const n=new Zr(e);return t=t.filter((t=>(n.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber300&&t.length>300)return!1;const r=(new Ei).compute(new Ti([e],new Mt(1,1,1,e.length),!1),new Ti([t],new Mt(1,1,1,t.length),!1),n);let i=0;const s=vi.invert(r.diffs,e.length);for(const t of s)t.seq1Range.forEach((t=>{Li(e.charCodeAt(t))||i++}));const o=function(t){let n=0;for(let r=0;rt.length?e:t);return i/o>.6&&o>10}function Di(e,t,n){let r=n;return r=qi(e,t,r),r=qi(e,t,r),r=function(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+10&&(o=o.delta(a))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function Ki(e,t,n,r,i){let s=1;for(;e.seq1Range.start-s>=r.start&&e.seq2Range.start-s>=i.start&&n.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let o=0;for(;e.seq1Range.start+ol&&(l=u,a=r)}return e.delta(a)}class Ui{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:Bi(this.lines[e-1]))+(e===this.lines.length?0:Bi(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Bi(e){let t=0;for(;te===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let r=0,i=e.length;re===t)))return new zr([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new zr([new oi(new Yr(1,e.length+1),new Yr(1,t.length+1),[new ai(new Mt(1,1,e.length,e[e.length-1].length+1),new Mt(1,1,t.length,t[t.length-1].length+1))])],[],!1);const r=0===n.maxComputationTimeMs?Ci.instance:new Si(n.maxComputationTimeMs),i=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map((e=>o(e.trim()))),l=t.map((e=>o(e.trim()))),u=new Ui(a,e),c=new Ui(l,t),h=(()=>u.length+c.length<1700?this.dynamicProgrammingDiffing.compute(u,c,r,((n,r)=>e[n]===t[r]?0===t[r].length?.1:1+Math.log(1+t[r].length):.99)):this.myersDiffingAlgorithm.compute(u,c,r))();let d=h.diffs,f=h.hitTimeout;d=Di(u,c,d),d=function(e,t,n){let r=n;if(0===r.length)return r;let i,s=0;do{i=!1;const o=[r[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}c(u,l)?(i=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}r=o}while(s++<10&&i);return r}(u,0,d);const m=[],g=n=>{if(i)for(let s=0;sn.seq1Range.start-p==n.seq2Range.start-b));g(n.seq1Range.start-p),p=n.seq1Range.endExclusive,b=n.seq2Range.endExclusive;const s=this.refineDiff(e,t,n,r,i);s.hitTimeout&&(f=!0);for(const e of s.mappings)m.push(e)}g(e.length-p);const y=ji(m,e,t);let v=[];return n.computeMoves&&(v=this.computeMoves(y,e,t,a,l,r,i)),Ur((()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function r(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const i of y){if(!i.innerChanges)return!1;for(const r of i.innerChanges){if(!(n(r.modifiedRange.getStartPosition(),t)&&n(r.modifiedRange.getEndPosition(),t)&&n(r.originalRange.getStartPosition(),e)&&n(r.originalRange.getEndPosition(),e)))return!1}if(!r(i.modified,t)||!r(i.original,e))return!1}return!0})),new zr(y,v,f)}computeMoves(e,t,n,r,i,s,o){return Fi(e,t,n,r,i,s).map((e=>{const r=ji(this.refineDiff(t,n,new vi(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o).mappings,t,n,!0);return new Hr(e,r)}))}refineDiff(e,t,n,r,i){var s;const o=new ri(new Yr((s=n).seq1Range.start+1,s.seq1Range.endExclusive+1),new Yr(s.seq2Range.start+1,s.seq2Range.endExclusive+1)).toRangeMapping2(e,t),a=new Ti(e,o.originalRange,i),l=new Ti(t,o.modifiedRange,i),u=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,r):this.myersDiffingAlgorithm.compute(a,l,r),c=!1;let h=u.diffs;h=Di(a,l,h),h=function(e,t,n){const r=vi.invert(n,e.length),i=[];let s=new _i(0,0);function o(n,o){if(n.offset10;){const n=r[0];if(!n.seq1Range.intersects(u.seq1Range)&&!n.seq2Range.intersects(u.seq2Range))break;const i=e.findWordContaining(n.seq1Range.start),s=t.findWordContaining(n.seq2Range.start),o=new vi(i,s),a=o.intersect(n);if(h+=a.seq1Range.length,d+=a.seq2Range.length,u=u.join(o),!(u.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;r.shift()}h+d<2*(u.seq1Range.length+u.seq2Range.length)/3&&i.push(u),s=u.getEndExclusives()}for(;r.length>0;){const e=r.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}return function(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;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}(n,i)}(a,l,h),h=function(e,t,n){const r=[];for(const e of n){const t=r[r.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?r[r.length-1]=new vi(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):r.push(e)}return r}(0,0,h),h=function(e,t,n){let r=n;if(0===r.length)return r;let i,s=0;do{i=!1;const a=[r[0]];for(let l=1;l5||i.length>500)return!1;const s=e.getText(i).trim();if(s.length>20||s.split(/\r\n|\r|\n/).length>1)return!1;const o=e.countLinesIn(n.seq1Range),a=n.seq1Range.length,l=t.countLinesIn(n.seq2Range),h=n.seq2Range.length,d=e.countLinesIn(r.seq1Range),f=r.seq1Range.length,m=t.countLinesIn(r.seq2Range),g=r.seq2Range.length;function p(e){return Math.min(e,130)}return Math.pow(Math.pow(p(40*o+a),1.5)+Math.pow(p(40*l+h),1.5),1.5)+Math.pow(Math.pow(p(40*d+f),1.5)+Math.pow(p(40*m+g),1.5),1.5)>74184.96480721243}h(c,u)?(i=!0,a[a.length-1]=a[a.length-1].join(u)):a.push(u)}r=a}while(s++<10&&i);const o=[];return function(e,t){for(let n=0;n{let i=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new Gr(a.start,n.seq1Range.start));s(l)&&(i=i.deltaStart(-l.length));const u=e.getText(new Gr(n.seq1Range.endExclusive,a.endExclusive));s(u)&&(i=i.deltaEnd(u.length));const c=vi.fromOffsetPairs(t?t.getEndExclusives():_i.zero,r?r.getStarts():_i.max),h=i.intersect(c);o.length>0&&h.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(h):o.push(h)})),o}(a,l,h);const d=h.map((e=>new ai(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range))));return{mappings:d,hitTimeout:u.hitTimeout}}}function ji(e,t,n,r=!1){const i=[];for(const r of function*(e,t){let n,r;for(const i of e)void 0!==r&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}(e.map((e=>function(e,t,n){let r=0,i=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+r<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+r<=e.modifiedRange.endLineNumber&&(i=-1);e.modifiedRange.startColumn-1>=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 Yr(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new Yr(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new oi(s,o,[e])}(e,t,n))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=r[0],t=r[r.length-1];i.push(new oi(e.original.join(t.original),e.modified.join(t.modified),r.map((e=>e.innerChanges[0]))))}return Ur((()=>{if(!r&&i.length>0){if(i[0].modified.startLineNumber!==i[0].original.startLineNumber)return!1;if(n.length-i[i.length-1].modified.endLineNumberExclusive!=t.length-i[i.length-1].original.endLineNumberExclusive)return!1}return Br(i,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusivenew li,zi=()=>new $i;function Hi(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class Gi{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=Hi(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class Ji{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=Hi(Math.max(Math.min(1,t),0),3),this.l=Hi(Math.max(Math.min(1,n),0),3),this.a=Hi(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=e.a,s=Math.max(t,n,r),o=Math.min(t,n,r);let a=0,l=0;const u=(o+s)/2,c=s-o;if(c>0){switch(l=Math.min(u<=.5?c/(2*u):c/(2-2*u),1),s){case t:a=(n-r)/c+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:r,a:i}=e;let s,o,a;if(0===n)s=o=a=r;else{const e=r<.5?r*(1+n):r+n-r*n,i=2*r-e;s=Ji._hue2rgb(i,e,t+1/3),o=Ji._hue2rgb(i,e,t),a=Ji._hue2rgb(i,e,t-1/3)}return new Gi(Math.round(255*s),Math.round(255*o),Math.round(255*a),i)}}class Xi{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=Hi(Math.max(Math.min(1,t),0),3),this.v=Hi(Math.max(Math.min(1,n),0),3),this.a=Hi(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),s=i-Math.min(t,n,r),o=0===i?0:s/i;let a;return a=0===s?0:i===t?((n-r)/s%6+6)%6:i===n?(r-t)/s+2:(t-n)/s+4,new Xi(Math.round(60*a),o,i,e.a)}static toRGBA(e){const{h:t,s:n,v:r,a:i}=e,s=r*n,o=s*(1-Math.abs(t/60%2-1)),a=r-s;let[l,u,c]=[0,0,0];return t<60?(l=s,u=o):t<120?(l=o,u=s):t<180?(u=s,c=o):t<240?(u=o,c=s):t<300?(l=o,c=s):t<=360&&(l=s,c=o),l=Math.round(255*(l+a)),u=Math.round(255*(u+a)),c=Math.round(255*(c+a)),new Gi(l,u,c,i)}}class Qi{static fromHex(e){return Qi.Format.CSS.parseHex(e)||Qi.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:Ji.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Xi.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof Gi)this.rgba=e;else if(e instanceof Ji)this._hsla=e,this.rgba=Ji.toRGBA(e);else{if(!(e instanceof Xi))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=Xi.toRGBA(e)}}equals(e){return!!e&&Gi.equals(this.rgba,e.rgba)&&Ji.equals(this.hsla,e.hsla)&&Xi.equals(this.hsva,e.hsva)}getRelativeLuminance(){return Hi(.2126*Qi._relativeLuminanceForComponent(this.rgba.r)+.7152*Qi._relativeLuminanceForComponent(this.rgba.g)+.0722*Qi._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()0)for(const r of n){const n=r.filter((e=>void 0!==e)),i=n[1],s=n[2];if(!s)continue;let o;if("rgb"===i){const t=/^\(\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=ns(es(e,r),is(s,t),!1)}else if("rgba"===i){const t=/^\(\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=ns(es(e,r),is(s,t),!0)}else if("hsl"===i){const t=/^\(\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=rs(es(e,r),is(s,t),!1)}else if("hsla"===i){const t=/^\(\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=rs(es(e,r),is(s,t),!0)}else"#"===i&&(o=ts(es(e,r),i+s));o&&t.push(o)}return t}(e):[]}!function(e){let t;!function(t){let n;!function(t){function n(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function r(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${n(e.rgba.r)}${n(e.rgba.g)}${n(e.rgba.b)}`},t.formatHexA=function(t,r=!1){return r&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${n(t.rgba.r)}${n(t.rgba.g)}${n(t.rgba.b)}${n(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){const n=t.length;if(0===n)return null;if(35!==t.charCodeAt(0))return null;if(7===n){const n=16*r(t.charCodeAt(1))+r(t.charCodeAt(2)),i=16*r(t.charCodeAt(3))+r(t.charCodeAt(4)),s=16*r(t.charCodeAt(5))+r(t.charCodeAt(6));return new e(new Gi(n,i,s,1))}if(9===n){const n=16*r(t.charCodeAt(1))+r(t.charCodeAt(2)),i=16*r(t.charCodeAt(3))+r(t.charCodeAt(4)),s=16*r(t.charCodeAt(5))+r(t.charCodeAt(6)),o=16*r(t.charCodeAt(7))+r(t.charCodeAt(8));return new e(new Gi(n,i,s,o/255))}if(4===n){const n=r(t.charCodeAt(1)),i=r(t.charCodeAt(2)),s=r(t.charCodeAt(3));return new e(new Gi(16*n+n,16*i+i,16*s+s))}if(5===n){const n=r(t.charCodeAt(1)),i=r(t.charCodeAt(2)),s=r(t.charCodeAt(3)),o=r(t.charCodeAt(4));return new e(new Gi(16*n+n,16*i+i,16*s+s,(16*o+o)/255))}return null}}(n=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(Qi||(Qi={}));const os=new RegExp("\\bMARK:\\s*(.*)$","d"),as=/^-+|-+$/g;function ls(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=function(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const r=e.getLineContent(i),s=r.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:i,startColumn:s[0].length+1,endLineNumber:i,endColumn:r.length+1};if(e.endColumn>e.startColumn){const t={range:e,...cs(r.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],n=e.getLineCount();for(let r=1;r<=n;r++){us(e.getLineContent(r),r,t)}return t}(e);n=n.concat(t)}return n}function us(e,t,n){os.lastIndex=0;const r=os.exec(e);if(r){const e={startLineNumber:t,startColumn:r.indices[1][0]+1,endLineNumber:t,endColumn:r.indices[1][1]+1};if(e.endColumn>e.startColumn){const t={range:e,...cs(r[1]),shouldBeInComments:!0};(t.text||t.hasSeparatorLine)&&n.push(t)}}}function cs(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(as,""),hasSeparatorLine:t}}class hs extends Ut{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>e&&(n=e,r=!0)}return r?{lineNumber:t,column:n}:e}}class ds{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new hs(_t.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,n){const r=this._getModel(e);return r?$r.computeUnicodeHighlights(r,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async findSectionHeaders(e,t){const n=this._getModel(e);return n?ls(n,t):[]}async computeDiff(e,t,n,r){const i=this._getModel(e),s=this._getModel(t);if(!i||!s)return null;return ds.computeDiff(i,s,n,r)}static computeDiff(e,t,n,r){const i="advanced"===r?zi():Wi(),s=e.getLinesContent(),o=t.getLinesContent(),a=i.computeDiff(s,o,n);function l(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let r=1;r<=n;r++){if(e.getLineContent(r)!==t.getLineContent(r))return!1}return!0}static{this._diffLimit=1e5}async computeMoreMinimalEdits(e,t,n){const r=this._getModel(e);if(!r)return t;const i=[];let s;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return Mt.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)}));let o=0;for(let e=1;eds._diffLimit){i.push({range:e,text:o});continue}const l=je(t,o,n),u=r.offsetAt(Mt.lift(e).getStartPosition());for(const e of l){const t=r.positionAt(u+e.originalStart),n=r.positionAt(u+e.originalStart+e.originalLength),s={text:o.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};r.getValueInRange(s.range)!==s.text&&i.push(s)}}return"number"==typeof s&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}async computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?Zt.computeLinks(e):[]}(t):null}async computeDefaultDocumentColors(e){const t=this._getModel(e);return t?ss(t):null}static{this._suggestionsLimit=1e4}async textualSuggest(e,t,n,r){const i=new N,s=new RegExp(n,r),o=new Set;e:for(const n of e){const e=this._getModel(n);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>ds._suggestionsLimit))break e}return{words:Array.from(o),duration:i.elapsed()}}async computeWordRanges(e,t,n,r){const i=this._getModel(e);if(!i)return Object.create(null);const s=new RegExp(n,r),o=Object.create(null);for(let e=t.startLineNumber;efunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},r={};for(const t of e)r[t]=n(t);return r}(n,((e,t)=>this._host.fhr(e,t))),i={host:r,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(i,t),Promise.resolve(F(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}"function"==typeof importScripts&&(globalThis.monaco={editor:void 0,languages:void 0,CancellationTokenSource:rn,Emitter:I,KeyCode:ir,KeyMod:Rr,Position:Tt,Range:Mt,Selection:bn,SelectionDirection:_r,MarkerSeverity:sr,MarkerTag:or,Uri:_t,Token:wn});let fs=!1;function ms(e){if(fs)return;fs=!0;const t=new De((e=>{globalThis.postMessage(e)}),(t=>new ds(t,e)));globalThis.onmessage=e=>{t.onmessage(e.data)}}globalThis.onmessage=e=>{fs||ms(null)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r,i,s=n(68621);
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/function o(e,t=!1){const n=e.length;let r=0,i="",s=0,o=16,c=0,h=0,d=0,f=0,m=0;function g(t,n){let i=0,s=0;for(;i=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}r++,i++}return i=n)return s=n,o=17;let t=e.charCodeAt(r);if(a(t)){do{r++,i+=String.fromCharCode(t),t=e.charCodeAt(r)}while(a(t));return o=15}if(l(t))return r++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,i+="\n"),c++,d=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=function(){let t="",i=r;for(;;){if(r>=n){t+=e.substring(i,r),m=2;break}const s=e.charCodeAt(r);if(34===s){t+=e.substring(i,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(l(s)){t+=e.substring(i,r),m=2;break}m=6}r++}else{if(t+=e.substring(i,r),r++,r>=n){m=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=g(4,!0);e>=0?t+=String.fromCharCode(e):m=4;break;default:m=5}i=r}}return t}(),o=10;case 47:const a=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;rr,scan:t?function(){let e;do{e=p()}while(e>=12&&e<=15);return e}:p,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>h,getTokenStartCharacter:()=>s-f,getTokenError:()=>m}}function a(e){return 32===e||9===e}function l(e){return 10===e||13===e}function u(e){return e>=48&&e<=57}(i=r||(r={}))[i.lineFeed=10]="lineFeed",i[i.carriageReturn=13]="carriageReturn",i[i.space=32]="space",i[i._0=48]="_0",i[i._1=49]="_1",i[i._2=50]="_2",i[i._3=51]="_3",i[i._4=52]="_4",i[i._5=53]="_5",i[i._6=54]="_6",i[i._7=55]="_7",i[i._8=56]="_8",i[i._9=57]="_9",i[i.a=97]="a",i[i.b=98]="b",i[i.c=99]="c",i[i.d=100]="d",i[i.e=101]="e",i[i.f=102]="f",i[i.g=103]="g",i[i.h=104]="h",i[i.i=105]="i",i[i.j=106]="j",i[i.k=107]="k",i[i.l=108]="l",i[i.m=109]="m",i[i.n=110]="n",i[i.o=111]="o",i[i.p=112]="p",i[i.q=113]="q",i[i.r=114]="r",i[i.s=115]="s",i[i.t=116]="t",i[i.u=117]="u",i[i.v=118]="v",i[i.w=119]="w",i[i.x=120]="x",i[i.y=121]="y",i[i.z=122]="z",i[i.A=65]="A",i[i.B=66]="B",i[i.C=67]="C",i[i.D=68]="D",i[i.E=69]="E",i[i.F=70]="F",i[i.G=71]="G",i[i.H=72]="H",i[i.I=73]="I",i[i.J=74]="J",i[i.K=75]="K",i[i.L=76]="L",i[i.M=77]="M",i[i.N=78]="N",i[i.O=79]="O",i[i.P=80]="P",i[i.Q=81]="Q",i[i.R=82]="R",i[i.S=83]="S",i[i.T=84]="T",i[i.U=85]="U",i[i.V=86]="V",i[i.W=87]="W",i[i.X=88]="X",i[i.Y=89]="Y",i[i.Z=90]="Z",i[i.asterisk=42]="asterisk",i[i.backslash=92]="backslash",i[i.closeBrace=125]="closeBrace",i[i.closeBracket=93]="closeBracket",i[i.colon=58]="colon",i[i.comma=44]="comma",i[i.dot=46]="dot",i[i.doubleQuote=34]="doubleQuote",i[i.minus=45]="minus",i[i.openBrace=123]="openBrace",i[i.openBracket=91]="openBracket",i[i.plus=43]="plus",i[i.slash=47]="slash",i[i.formFeed=12]="formFeed",i[i.tab=9]="tab";var c,h=new Array(20).fill(0).map(((e,t)=>" ".repeat(t))),d=200,f={" ":{"\n":new Array(d).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),"\r":new Array(d).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),"\r\n":new Array(d).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t)))},"\t":{"\n":new Array(d).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),"\r":new Array(d).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),"\r\n":new Array(d).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)))}},m=["\n","\r","\r\n"];function g(e,t,n){let r,i,s,a,l;if(t){for(a=t.offset,l=a+t.length,s=a;s>0&&!b(e,s-1);)s--;let o=l;for(;o1)return p(u,g)+p(d,r+y);const e=d.length*(r+y);return!c||e>f[v][u].length?u+p(d,r+y):e<=0?u:f[v][u][e]}function w(){let e=_.scan();for(g=0;15===e||14===e;)14===e&&n.keepLines?g+=1:14===e&&(g=1),e=_.scan();return C=16===e||0!==_.getTokenError(),e}const L=[];function N(n,r,i){C||t&&!(ra)||e.substring(r,i)===n||L.push({offset:r,length:i-r,content:n})}let x=w();if(n.keepLines&&g>0&&N(p(u,g),0,0),17!==x){let e=_.getTokenOffset()+s;N(d.length*r<20&&n.insertSpaces?h[d.length*r]:p(d,r),s,e)}for(;17!==x;){let e=_.getTokenOffset()+_.getTokenLength()+s,t=w(),r="",i=!1;for(;0===g&&(12===t||13===t);){let n=_.getTokenOffset()+s;N(h[1],e,n),e=_.getTokenOffset()+_.getTokenLength()+s,i=12===t,r=i?S():"",t=w()}if(2===t)1!==x&&y--,n.keepLines&&g>0||!n.keepLines&&1!==x?r=S():n.keepLines&&(r=h[1]);else if(4===t)3!==x&&y--,n.keepLines&&g>0||!n.keepLines&&3!==x?r=S():n.keepLines&&(r=h[1]);else{switch(x){case 3:case 1:y++,r=n.keepLines&&g>0||!n.keepLines?S():h[1];break;case 5:r=n.keepLines&&g>0||!n.keepLines?S():h[1];break;case 12:r=S();break;case 13:g>0?r=S():i||(r=h[1]);break;case 6:n.keepLines&&g>0?r=S():i||(r=h[1]);break;case 10:n.keepLines&&g>0?r=S():6!==t||i||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&g>0?r=S():12!==t&&13!==t||i?5!==t&&17!==t&&(C=!0):r=h[1];break;case 16:C=!0}g>0&&(12===t||13===t)&&(r=S())}17===t&&(r=n.keepLines&&g>0?S():n.insertFinalNewline?u:"");N(r,e,_.getTokenOffset()+s),x=t}return L}function p(e,t){let n="";for(let r=0;re(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice())):()=>!0}const h=a(t.onObjectBegin),d=u(t.onObjectProperty),f=s(t.onObjectEnd),m=a(t.onArrayBegin),g=s(t.onArrayEnd),p=u(t.onLiteralValue),b=l(t.onSeparator),y=s(t.onComment),v=l(t.onError),_=n&&n.disallowComments,C=n&&n.allowTrailingComma;function S(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:_||w(11);break;case 2:w(12);break;case 6:w(16)}switch(e){case 12:case 13:_?w(10):y();break;case 16:w(1);break;case 15:case 14:break;default:return e}}}function w(e,t=[],n=[]){if(v(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){S();break}if(-1!==n.indexOf(e))break;e=S()}}}function L(e){const t=r.getTokenValue();return e?p(t):(d(t),i.push(t)),S(),!0}function N(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(w(2),t=0),p(t);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return S(),!0}function x(){return 10!==r.getToken()?(w(3,[],[2,5]),!1):(L(!1),6===r.getToken()?(b(":"),S(),k()||w(4,[],[2,5])):w(5,[],[2,5]),i.pop(),!0)}function E(){h(),S();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||w(4,[],[]),b(","),S(),2===r.getToken()&&C)break}else e&&w(6,[],[]);x()||w(4,[],[2,5]),e=!0}return f(),2!==r.getToken()?w(7,[2],[]):S(),!0}function A(){m(),S();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||w(4,[],[]),b(","),S(),4===r.getToken()&&C)break}else t&&w(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,k()||w(4,[],[4,5]),t=!0}return g(),e||i.pop(),4!==r.getToken()?w(8,[4],[]):S(),!0}function k(){switch(r.getToken()){case 3:return A();case 1:return E();case 10:return L(!0);default:return N()}}if(S(),17===r.getToken())return!!n.allowEmptyContent||(w(4,[],[]),!1);if(!k())return w(4,[],[]),!1;17!==r.getToken()&&w(9,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(i),i=e,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]},Qt=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t0?e.lastIndexOf(t)===n:0===n&&e===t}function ln(e){let t="";(function(e,t){if(e.length0&&(r.arguments=n),r},se.is=function(e){let t=e;return cn.defined(t)&&cn.string(t.title)&&cn.string(t.command)},(ae=oe||(oe={})).replace=function(e,t){return{range:e,newText:t}},ae.insert=function(e,t){return{range:{start:e,end:e},newText:t}},ae.del=function(e){return{range:e,newText:""}},ae.is=function(e){const t=e;return cn.objectLiteral(t)&&cn.string(t.newText)&&O.is(t.range)},(ue=le||(le={})).create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},ue.is=function(e){const t=e;return cn.objectLiteral(t)&&cn.string(t.label)&&(cn.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(cn.string(t.description)||void 0===t.description)},(ce||(ce={})).is=function(e){const t=e;return cn.string(t)},(de=he||(he={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},de.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},de.del=function(e,t){return{range:e,newText:"",annotationId:t}},de.is=function(e){const t=e;return oe.is(t)&&(le.is(t.annotationId)||ce.is(t.annotationId))},(me=fe||(fe={})).create=function(e,t){return{textDocument:e,edits:t}},me.is=function(e){let t=e;return cn.defined(t)&&xe.is(t.textDocument)&&Array.isArray(t.edits)},(pe=ge||(ge={})).create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},pe.is=function(e){let t=e;return t&&"create"===t.kind&&cn.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||cn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||cn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||ce.is(t.annotationId))},(ye=be||(be={})).create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},ye.is=function(e){let t=e;return t&&"rename"===t.kind&&cn.string(t.oldUri)&&cn.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||cn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||cn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||ce.is(t.annotationId))},(_e=ve||(ve={})).create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},_e.is=function(e){let t=e;return t&&"delete"===t.kind&&cn.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||cn.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||cn.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||ce.is(t.annotationId))},(Ce||(Ce={})).is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>cn.string(e.kind)?ge.is(e)||be.is(e)||ve.is(e):fe.is(e))))},(we=Se||(Se={})).create=function(e){return{uri:e}},we.is=function(e){let t=e;return cn.defined(t)&&cn.string(t.uri)},(Ne=Le||(Le={})).create=function(e,t){return{uri:e,version:t}},Ne.is=function(e){let t=e;return cn.defined(t)&&cn.string(t.uri)&&cn.integer(t.version)},(Ee=xe||(xe={})).create=function(e,t){return{uri:e,version:t}},Ee.is=function(e){let t=e;return cn.defined(t)&&cn.string(t.uri)&&(null===t.version||cn.integer(t.version))},(ke=Ae||(Ae={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},ke.is=function(e){let t=e;return cn.defined(t)&&cn.string(t.uri)&&cn.string(t.languageId)&&cn.integer(t.version)&&cn.string(t.text)},(Te=Re||(Re={})).PlainText="plaintext",Te.Markdown="markdown",Te.is=function(e){const t=e;return t===Te.PlainText||t===Te.Markdown},(Me||(Me={})).is=function(e){const t=e;return cn.objectLiteral(e)&&Re.is(t.kind)&&cn.string(t.value)},(Ie=Oe||(Oe={})).Text=1,Ie.Method=2,Ie.Function=3,Ie.Constructor=4,Ie.Field=5,Ie.Variable=6,Ie.Class=7,Ie.Interface=8,Ie.Module=9,Ie.Property=10,Ie.Unit=11,Ie.Value=12,Ie.Enum=13,Ie.Keyword=14,Ie.Snippet=15,Ie.Color=16,Ie.File=17,Ie.Reference=18,Ie.Folder=19,Ie.EnumMember=20,Ie.Constant=21,Ie.Struct=22,Ie.Event=23,Ie.Operator=24,Ie.TypeParameter=25,(Fe=Pe||(Pe={})).PlainText=1,Fe.Snippet=2,(Ve||(Ve={})).Deprecated=1,(qe=De||(De={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},qe.is=function(e){const t=e;return t&&cn.string(t.newText)&&O.is(t.insert)&&O.is(t.replace)},(Ue=Ke||(Ke={})).asIs=1,Ue.adjustIndentation=2,(Be||(Be={})).is=function(e){const t=e;return t&&(cn.string(t.detail)||void 0===t.detail)&&(cn.string(t.description)||void 0===t.description)},($e||($e={})).create=function(e){return{label:e}},(je||(je={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(ze=We||(We={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},ze.is=function(e){const t=e;return cn.string(t)||cn.objectLiteral(t)&&cn.string(t.language)&&cn.string(t.value)},(He||(He={})).is=function(e){let t=e;return!!t&&cn.objectLiteral(t)&&(Me.is(t.contents)||We.is(t.contents)||cn.typedArray(t.contents,We.is))&&(void 0===e.range||O.is(e.range))},(Ge||(Ge={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(Je||(Je={})).create=function(e,t,...n){let r={label:e};return cn.defined(t)&&(r.documentation=t),cn.defined(n)?r.parameters=n:r.parameters=[],r},(Qe=Xe||(Xe={})).Text=1,Qe.Read=2,Qe.Write=3,(Ze||(Ze={})).create=function(e,t){let n={range:e};return cn.number(t)&&(n.kind=t),n},(et=Ye||(Ye={})).File=1,et.Module=2,et.Namespace=3,et.Package=4,et.Class=5,et.Method=6,et.Property=7,et.Field=8,et.Constructor=9,et.Enum=10,et.Interface=11,et.Function=12,et.Variable=13,et.Constant=14,et.String=15,et.Number=16,et.Boolean=17,et.Array=18,et.Object=19,et.Key=20,et.Null=21,et.EnumMember=22,et.Struct=23,et.Event=24,et.Operator=25,et.TypeParameter=26,(tt||(tt={})).Deprecated=1,(nt||(nt={})).create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s},(rt||(rt={})).create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}},(st=it||(it={})).create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},st.is=function(e){let t=e;return t&&cn.string(t.name)&&cn.number(t.kind)&&O.is(t.range)&&O.is(t.selectionRange)&&(void 0===t.detail||cn.string(t.detail))&&(void 0===t.deprecated||cn.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(at=ot||(ot={})).Empty="",at.QuickFix="quickfix",at.Refactor="refactor",at.RefactorExtract="refactor.extract",at.RefactorInline="refactor.inline",at.RefactorRewrite="refactor.rewrite",at.Source="source",at.SourceOrganizeImports="source.organizeImports",at.SourceFixAll="source.fixAll",(ut=lt||(lt={})).Invoked=1,ut.Automatic=2,(ht=ct||(ct={})).create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},ht.is=function(e){let t=e;return cn.defined(t)&&cn.typedArray(t.diagnostics,ne.is)&&(void 0===t.only||cn.typedArray(t.only,cn.string))&&(void 0===t.triggerKind||t.triggerKind===lt.Invoked||t.triggerKind===lt.Automatic)},(ft=dt||(dt={})).create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):ie.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},ft.is=function(e){let t=e;return t&&cn.string(t.title)&&(void 0===t.diagnostics||cn.typedArray(t.diagnostics,ne.is))&&(void 0===t.kind||cn.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||ie.is(t.command))&&(void 0===t.isPreferred||cn.boolean(t.isPreferred))&&(void 0===t.edit||Ce.is(t.edit))},(gt=mt||(mt={})).create=function(e,t){let n={range:e};return cn.defined(t)&&(n.data=t),n},gt.is=function(e){let t=e;return cn.defined(t)&&O.is(t.range)&&(cn.undefined(t.command)||ie.is(t.command))},(bt=pt||(pt={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},bt.is=function(e){let t=e;return cn.defined(t)&&cn.uinteger(t.tabSize)&&cn.boolean(t.insertSpaces)},(vt=yt||(yt={})).create=function(e,t,n){return{range:e,target:t,data:n}},vt.is=function(e){let t=e;return cn.defined(t)&&O.is(t.range)&&(cn.undefined(t.target)||cn.string(t.target))},(Ct=_t||(_t={})).create=function(e,t){return{range:e,parent:t}},Ct.is=function(e){let t=e;return cn.objectLiteral(t)&&O.is(t.range)&&(void 0===t.parent||Ct.is(t.parent))},(wt=St||(St={})).namespace="namespace",wt.type="type",wt.class="class",wt.enum="enum",wt.interface="interface",wt.struct="struct",wt.typeParameter="typeParameter",wt.parameter="parameter",wt.variable="variable",wt.property="property",wt.enumMember="enumMember",wt.event="event",wt.function="function",wt.method="method",wt.macro="macro",wt.keyword="keyword",wt.modifier="modifier",wt.comment="comment",wt.string="string",wt.number="number",wt.regexp="regexp",wt.operator="operator",wt.decorator="decorator",(Nt=Lt||(Lt={})).declaration="declaration",Nt.definition="definition",Nt.readonly="readonly",Nt.static="static",Nt.deprecated="deprecated",Nt.abstract="abstract",Nt.async="async",Nt.modification="modification",Nt.documentation="documentation",Nt.defaultLibrary="defaultLibrary",(xt||(xt={})).is=function(e){const t=e;return cn.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(At=Et||(Et={})).create=function(e,t){return{range:e,text:t}},At.is=function(e){const t=e;return null!=t&&O.is(t.range)&&cn.string(t.text)},(Rt=kt||(kt={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Rt.is=function(e){const t=e;return null!=t&&O.is(t.range)&&cn.boolean(t.caseSensitiveLookup)&&(cn.string(t.variableName)||void 0===t.variableName)},(Mt=Tt||(Tt={})).create=function(e,t){return{range:e,expression:t}},Mt.is=function(e){const t=e;return null!=t&&O.is(t.range)&&(cn.string(t.expression)||void 0===t.expression)},(It=Ot||(Ot={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},It.is=function(e){const t=e;return cn.defined(t)&&O.is(e.stoppedLocation)},(Ft=Pt||(Pt={})).Type=1,Ft.Parameter=2,Ft.is=function(e){return 1===e||2===e},(Dt=Vt||(Vt={})).create=function(e){return{value:e}},Dt.is=function(e){const t=e;return cn.objectLiteral(t)&&(void 0===t.tooltip||cn.string(t.tooltip)||Me.is(t.tooltip))&&(void 0===t.location||P.is(t.location))&&(void 0===t.command||ie.is(t.command))},(Kt=qt||(qt={})).create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},Kt.is=function(e){const t=e;return cn.objectLiteral(t)&&T.is(t.position)&&(cn.string(t.label)||cn.typedArray(t.label,Vt.is))&&(void 0===t.kind||Pt.is(t.kind))&&void 0===t.textEdits||cn.typedArray(t.textEdits,oe.is)&&(void 0===t.tooltip||cn.string(t.tooltip)||Me.is(t.tooltip))&&(void 0===t.paddingLeft||cn.boolean(t.paddingLeft))&&(void 0===t.paddingRight||cn.boolean(t.paddingRight))},(Ut||(Ut={})).createSnippet=function(e){return{kind:"snippet",value:e}},(Bt||(Bt={})).create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}},($t||($t={})).create=function(e){return{items:e}},(Wt=jt||(jt={})).Invoked=0,Wt.Automatic=1,(zt||(zt={})).create=function(e,t){return{range:e,text:t}},(Ht||(Ht={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(Gt||(Gt={})).is=function(e){const t=e;return cn.objectLiteral(t)&&x.is(t.uri)&&cn.string(t.name)},function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,l=0;for(;o{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(Jt||(Jt={}));var cn,hn=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&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(0===r)return T.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return T.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+1e?r=i:n=i+1}let i=n-1;return{line:i,character: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+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ln(e){const t=wn(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function Nn(...e){const t=e[0];let n,r,i;if("string"==typeof t)n=t,r=t,e.splice(0,1),i=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let r=t[0];for(let e=1;e0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{}}const s=vn?.[n];return s?"string"==typeof s?En(s,i):s.comment?En(s.message,i):En(r,i):En(r,i)}(fn=dn||(dn={})).create=function(e,t,n,r){return new _n(e,t,n,r)},fn.update=function(e,t,n){if(e instanceof _n)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},fn.applyEdits=function(e,t){let n=e.getText(),r=Cn(t.map(Ln),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=0;const s=[];for(const t of r){let r=e.offsetAt(t.range.start);if(ri&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")},(gn=mn||(mn={}))[gn.Undefined=0]="Undefined",gn[gn.EnumValueMismatch=1]="EnumValueMismatch",gn[gn.Deprecated=2]="Deprecated",gn[gn.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",gn[gn.UnexpectedEndOfString=258]="UnexpectedEndOfString",gn[gn.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",gn[gn.InvalidUnicode=260]="InvalidUnicode",gn[gn.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",gn[gn.InvalidCharacter=262]="InvalidCharacter",gn[gn.PropertyExpected=513]="PropertyExpected",gn[gn.CommaExpected=514]="CommaExpected",gn[gn.ColonExpected=515]="ColonExpected",gn[gn.ValueExpected=516]="ValueExpected",gn[gn.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",gn[gn.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",gn[gn.TrailingComma=519]="TrailingComma",gn[gn.DuplicateKey=520]="DuplicateKey",gn[gn.CommentNotPermitted=521]="CommentNotPermitted",gn[gn.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",gn[gn.SchemaResolveError=768]="SchemaResolveError",gn[gn.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",(bn=pn||(pn={}))[bn.v3=3]="v3",bn[bn.v4=4]="v4",bn[bn.v6=6]="v6",bn[bn.v7=7]="v7",bn[bn.v2019_09=19]="v2019_09",bn[bn.v2020_12=20]="v2020_12",(yn||(yn={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Re.Markdown,Re.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}};var xn=/{([^}]+)}/g;function En(e,t){return 0===Object.keys(t).length?e:e.replace(xn,((e,n)=>t[n]??e))}var An,kn,Rn={"color-hex":{errorMessage:Nn("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:Nn("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:Nn("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:Nn("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:Nn("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:Nn("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:Nn("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:Nn("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},Tn=class{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Mn=class extends Tn{constructor(e,t){super(e,t),this.type="null",this.value=null}},On=class extends Tn{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}},In=class extends Tn{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}},Pn=class extends Tn{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Fn=class extends Tn{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}},Vn=class extends Tn{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},Dn=class extends Tn{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}};function qn(e){return rn(e)?e?{}:{not:{}}:e}(kn=An||(An={}))[kn.Key=0]="Key",kn[kn.Enum=1]="Enum";var Kn={"http://json-schema.org/draft-03/schema#":pn.v3,"http://json-schema.org/draft-04/schema#":pn.v4,"http://json-schema.org/draft-06/schema#":pn.v6,"http://json-schema.org/draft-07/schema#":pn.v7,"https://json-schema.org/draft/2019-09/schema":pn.v2019_09,"https://json-schema.org/draft/2020-12/schema":pn.v2020_12},Un=class{constructor(e){this.schemaDraft=e}},Bn=class e{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||Hn(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},$n=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};$n.instance=new $n;var jn=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===mn.EnumValueMismatch&&(e.message=Nn("Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};function Wn(e){return Yt(e)}function zn(e){return Zt(e)}function Hn(e,t,n=!1){return t>=e.offset&&t{let r=e(n);const i=n.children;if(Array.isArray(i))for(let e=0;e{const r=O.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return ne.create(r,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new Bn(t,n),i=Jn(e),s=new Un(i);return Xn(this.root,e,new jn,r,s),r.schemas}return[]}};function Jn(e,t=pn.v2020_12){let n=e.$schema;return n?Kn[n]??t:t}function Xn(e,t,n,r,i){if(!e||!r.include(e))return;if("property"===e.type)return Xn(e.valueNode,t,n,r,i);const s=e;switch(function(){function e(e){return s.type===e||"integer"===e&&"number"===s.type&&s.isInteger}Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Nn("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Nn('Incorrect type. Expected "{0}".',t.type)}));if(Array.isArray(t.allOf))for(const e of t.allOf){const t=new jn,o=r.newSub();Xn(s,qn(e),t,o,i),n.merge(t),r.merge(o)}const o=qn(t.not);if(o){const e=new jn,a=r.newSub();Xn(s,o,e,a,i),e.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Nn("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,r.add(e)}const a=(e,t)=>{const o=[];let a;for(const n of e){const e=qn(n),l=new jn,u=r.newSub();if(Xn(s,e,l,u,i),l.hasProblems()||o.push(e),a)if(t||l.hasProblems()||a.validationResult.hasProblems()){const t=l.compare(a.validationResult);t>0?a={schema:e,validationResult:l,matchingSchemas:u}:0===t&&(a.matchingSchemas.merge(u),a.validationResult.mergeEnumValues(l))}else a.matchingSchemas.merge(u),a.validationResult.propertiesMatches+=l.propertiesMatches,a.validationResult.propertiesValueMatches+=l.propertiesValueMatches,a.validationResult.mergeProcessedProperties(l);else a={schema:e,validationResult:l,matchingSchemas:u}}return o.length>1&&t&&n.problems.push({location:{offset:s.offset,length:1},message:Nn("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),r.merge(a.matchingSchemas)),o.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1);Array.isArray(t.oneOf)&&a(t.oneOf,!0);const l=e=>{const t=new jn,o=r.newSub();Xn(s,qn(e),t,o,i),n.merge(t),r.merge(o)},u=qn(t.if);u&&((e,t,o)=>{const a=qn(e),u=new jn,c=r.newSub();Xn(s,a,u,c,i),r.merge(c),n.mergeProcessedProperties(u),u.hasProblems()?o&&l(o):t&&l(t)})(u,qn(t.then),qn(t.else));if(Array.isArray(t.enum)){const e=Wn(s);let r=!1;for(const n of t.enum)if(en(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:s.offset,length:s.length},code:mn.EnumValueMismatch,message:t.errorMessage||Nn("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}if(nn(t.const)){en(Wn(s),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:mn.EnumValueMismatch,message:t.errorMessage||Nn("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let c=t.deprecationMessage;if(c||t.deprecated){c=c||Nn("Value is deprecated");let e="property"===s.parent?.type?s.parent:s;n.problems.push({location:{offset:e.offset,length:e.length},severity:Q.Warning,message:c,code:mn.Deprecated})}}(),s.type){case"object":!function(e){const s=Object.create(null),o=new Set;for(const t of e.properties){const e=t.keyNode.value;s[e]=t.valueNode,o.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!s[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,i=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:i,message:Nn('Missing property "{0}".',r)})}const a=e=>{o.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const o=t.properties[e],l=s[e];if(l)if(rn(o))if(o)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=l.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||Nn("Property {0} is not allowed.",e)})}else{const e=new jn;Xn(l,o,e,r,i),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const l=ln(e);if(l){const u=[];for(const a of o)if(l.test(a)){u.push(a);const o=s[a];if(o){const s=t.patternProperties[e];if(rn(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||Nn("Property {0} is not allowed.",a)})}else{const e=new jn;Xn(o,s,e,r,i),n.mergePropertyMatch(e)}}}u.forEach(a)}}const l=t.additionalProperties;if(void 0!==l)for(const e of o){a(e);const o=s[e];if(o)if(!1===l){const r=o.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||Nn("Property {0} is not allowed.",e)})}else if(!0!==l){const e=new jn;Xn(o,l,e,r,i),n.mergePropertyMatch(e)}}const u=t.unevaluatedProperties;if(void 0!==u){const e=[];for(const a of o)if(!n.processedProperties.has(a)){e.push(a);const o=s[a];if(o)if(!1===u){const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||Nn("Property {0} is not allowed.",a)})}else if(!0!==u){const e=new jn;Xn(o,u,e,r,i),n.mergePropertyMatch(e)}}e.forEach(a)}tn(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:Nn("Object has more properties than limit of {0}.",t.maxProperties)});tn(t.minProperties)&&e.properties.length=pn.v2020_12?(s=t.prefixItems,o=Array.isArray(t.items)?void 0:t.items):(s=Array.isArray(t.items)?t.items:void 0,o=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==s){const t=Math.min(s.length,e.items.length);for(;a=pn.v2020_12&&n.processedProperties.add(String(t)))}0!==r||tn(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||Nn("Array does not contain required item.")}),tn(t.minContains)&&rt.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||Nn("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const u=t.unevaluatedItems;if(void 0!==u)for(let s=0;st.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:Nn("Array has too many items. Expected {0} or fewer.",t.maxItems)});if(!0===t.uniqueItems){let t=function(){for(let e=0;et.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:Nn("String is longer than the maximum length of {0}.",t.maxLength)});if(sn(t.pattern)){const r=ln(t.pattern);r?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Nn('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=Nn("URI with a scheme is expected.")):r=Nn("URI is expected.")}else r=Nn("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Nn("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=Rn[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(s);break;case"number":!function(e){const r=e.value;function i(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(tn(t.multipleOf)){let s=-1;if(Number.isInteger(t.multipleOf))s=r%t.multipleOf;else{let e=i(t.multipleOf),n=i(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier=l&&n.problems.push({location:{offset:e.offset,length:e.length},message:Nn("Value is above the exclusive maximum of {0}.",l)});const u=o(t.minimum,t.exclusiveMinimum);tn(u)&&rc&&n.problems.push({location:{offset:e.offset,length:e.length},message:Nn("Value is above the maximum of {0}.",c)})}(s)}r.add({node:s,schema:t})}function Qn(e,t){const n=[];let r=-1;const i=e.getText(),s=S(i,!1),o=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=s.scan();switch(c(),t){case 12:case 13:Array.isArray(o)&&o.push(O.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return t}}}function l(t,i,s,o,a=Q.Error){if(0===n.length||s!==r){const l=O.create(e.positionAt(s),e.positionAt(o));n.push(ne.create(l,t,a,i,e.languageId)),r=s}}function u(e,t,n=void 0,r=[],o=[]){let u=s.getTokenOffset(),c=s.getTokenOffset()+s.getTokenLength();if(u===c&&u>0){for(u--;u>0&&/\s/.test(i.charAt(u));)u--;c=u+1}if(l(e,t,u,c),n&&h(n,!1),r.length+o.length>0){let e=s.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==o.indexOf(e))break;e=a()}}return n}function c(){switch(s.getTokenError()){case 4:return u(Nn("Invalid unicode sequence in string."),mn.InvalidUnicode),!0;case 5:return u(Nn("Invalid escape character in string."),mn.InvalidEscapeCharacter),!0;case 3:return u(Nn("Unexpected end of number."),mn.UnexpectedEndOfNumber),!0;case 1:return u(Nn("Unexpected end of comment."),mn.UnexpectedEndOfComment),!0;case 2:return u(Nn("Unexpected end of string."),mn.UnexpectedEndOfString),!0;case 6:return u(Nn("Invalid characters in string. Control characters must be escaped."),mn.InvalidCharacter),!0}return!1}function h(e,t){return e.length=s.getTokenOffset()+s.getTokenLength()-e.offset,t&&a(),e}const d=new Fn(void 0,0,0);function f(t,n){const r=new Vn(t,s.getTokenOffset(),d);let i=m(r);if(!i){if(16!==s.getToken())return;{u(Nn("Property keys must be doublequoted"),mn.PropertyKeysMustBeDoublequoted);const e=new Fn(r,s.getTokenOffset(),s.getTokenLength());e.value=s.getTokenValue(),i=e,a()}}if(r.keyNode=i,"//"!==i.value){const e=n[i.value];e?(l(Nn("Duplicate object key"),mn.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,Q.Warning),on(e)&&l(Nn("Duplicate object key"),mn.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,Q.Warning),n[i.value]=!0):n[i.value]=r}if(6===s.getToken())r.colonOffset=s.getTokenOffset(),a();else if(u(Nn("Colon expected"),mn.ColonExpected),10===s.getToken()&&e.positionAt(i.offset+i.length).line=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},i=e.getText(),s=e.offsetAt(t);let o=n.getNodeFromOffset(s,!0);if(this.isInComment(e,o?o.offset:0,s))return Promise.resolve(r);if(o&&s===o.offset+o.length&&s>0){const e=i[s-1];("object"===o.type&&"}"===e||"array"===o.type&&"]"===e)&&(o=o.parent)}const a=this.getCurrentWord(e,s);let l;if(!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type){let n=s-a.length;n>0&&'"'===i[n-1]&&n--,l=O.create(e.positionAt(n),t)}else l=O.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));const u=new Map,c={add:e=>{let t=e.label;const n=u.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";u.has(e)||(t=e)}e.textEdit=oe.replace(l,e.insertText),e.label=t,u.set(t,e),r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const h=[];let d,f=!0,m="";if(o&&"string"===o.type){const e=o.parent;e&&"property"===e.type&&e.keyNode===o&&(f=!e.valueNode,d=e,m=i.substr(o.offset+1,o.length-2),e&&(o=e.parent))}if(o&&"object"===o.type){if(o.offset===s)return r;o.properties.forEach((e=>{d&&d===e||u.set(e.keyNode.value,$e.create("__"))}));let g="";f&&(g=this.evaluateSeparatorAfter(e,e.offsetAt(l.end))),t?this.getPropertyCompletions(t,n,o,f,g,c):this.getSchemaLessPropertyCompletions(n,o,m,c);const p=zn(o);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,p,a,f,""===g,c);n&&h.push(n)})),!t&&a.length>0&&'"'!==i.charAt(s-a.length-1)&&(c.add({kind:Oe.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,g),insertTextFormat:Pe.Snippet,documentation:""}),c.setAsIncomplete())}const g={};return t?this.getValueCompletions(t,n,o,s,e,c,g):this.getSchemaLessValueCompletions(n,o,s,e,c),this.contributions.length>0&&this.getContributedValueCompletions(n,o,s,e,c,h),this.promiseConstructor.all(h).then((()=>{if(0===c.getNumberOfProposals()){let t=s;!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type||(t=o.offset+o.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(g,n,c)}return r}))}))}getPropertyCompletions(e,t,n,r,i,s){t.getMatchingSchemas(e.schema,n.offset).forEach((e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach((e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:Oe.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,i),insertTextFormat:Pe.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&an(t.insertText,`$1${i}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(t)}}));const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const o={kind:Oe.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,i),insertTextFormat:Pe.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(o.sortText=n.suggestSortText),o.insertText&&an(o.insertText,`$1${i}`)&&(o.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(o)};if(n.enum)for(let t=0;t{e.properties.forEach((e=>{const t=e.keyNode.value;r.add({kind:Oe.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:Pe.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&i(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&i(e)}));else"object"===t.type&&r.add({kind:Oe.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:Pe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,i){let s=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(s=t.offset+t.length,t=t.parent),!t)return i.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Pe.Snippet,documentation:""}),void i.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Pe.Snippet,documentation:""});const o=this.evaluateSeparatorAfter(r,s),a=e=>{e.parent&&!Hn(e.parent,n,!0)&&i.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,o),insertTextFormat:Pe.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,o,i)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const s=t.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===s&&e.valueNode&&a(e.valueNode),!0))),"$schema"===s&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(o,i)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0)))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,i,s,o){let a,l,u=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(u=n.offset+n.length,l=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const c=this.evaluateSeparatorAfter(i,u),h=t.getMatchingSchemas(e.schema,n.offset,l);for(const e of h)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=s;if(e.schema.uniqueItems){const e=new Set;n.children.forEach((t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Wn(t)))})),t={...s,add(t){e.has(t.label)||s.add(t)}}}if(Array.isArray(e.schema.items)){const s=this.findItemAtOffset(n,i,r);s(t.colonOffset||0)){const e=t.keyNode.value,o=t.valueNode;if((!o||n<=o.offset+o.length)&&t.parent){const n=zn(t.parent);this.contributions.forEach((t=>{const o=t.collectValueCompletions(r.uri,n,e,i);o&&s.push(o)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(r.uri,i);t&&s.push(t)}))}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))))}addDefaultValueCompletions(e,t,n,r=0){let i=!1;if(nn(e.default)){let s=e.type,o=e.default;for(let e=r;e>0;e--)o=[o],s="array";const a={kind:this.getSuggestionKind(s),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:Pe.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:Nn("Default value")}:a.detail=Nn("Default value"),n.add(a),i=!0}Array.isArray(e.examples)&&e.examples.forEach((s=>{let o=e.type,a=s;for(let e=r;e>0;e--)a=[a],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:Pe.Snippet}),i=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((s=>{let o,a,l=e.type,u=s.body,c=s.label;if(nn(u)){let n=e.type;for(let e=r;e>0;e--)u=[u],n="array";o=this.getInsertTextForSnippetValue(u,t),a=this.getFilterTextForSnippetValue(u),c=c||this.getLabelForSnippetValue(u)}else{if("string"!=typeof s.bodyText)return;{let e="",n="",i="";for(let t=r;t>0;t--)e=e+i+"[\n",n=n+"\n"+i+"]",i+="\t",l="array";o=e+i+s.bodyText.split("\n").join("\n"+i)+n+t,c=c||o,a=o.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(l),label:c,documentation:this.fromMarkup(s.markdownDescription)||s.description,insertText:o,insertTextFormat:Pe.Snippet,filterText:a}),i=!0})),!i&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(nn(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:Pe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,i=e.enum.length;rt[e]=!0)):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:Pe.Snippet,detail:Nn("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:Pe.Snippet,detail:Nn("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:Pe.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Pe.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds((e=>"http"===e||"https"===e)).forEach((n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:Oe.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:Pe.Snippet,documentation:""})}))}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return Zn(e,"",(e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return Oe.Value;switch(e){case"string":default:return Oe.Value;case"object":return Oe.Module;case"property":return Oe.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const i=this.getInsertTextForValue(e,"");if(!n)return i;const s=i+": ";let o,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;nn(e)&&(o=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(o||1!==t.enum.length||(o=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),nn(t.const)&&(o||(o=this.getInsertTextForGuessedValue(t.const,"")),a++),nn(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(o||(o=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return i}}}return(!o||a>1)&&(o="$1"),s+o+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=S(e.getText(),!0);n.setPosition(t);switch(n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=S(t.getText(),!0),i=e.items;for(let e=i.length-1;e>=0;e--){const t=i[e];if(n>t.offset+t.length){r.setPosition(t.offset+t.length);return 5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e}if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=S(e.getText(),!1);r.setPosition(t);let i=r.scan();for(;17!==i&&r.getTokenOffset()+r.getTokenLength()i.offset+1&&r({contents:e,range:o}),l=zn(i);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,l);if(n)return n.then((e=>a(e)))}return this.schemaService.getSchemaForResource(e.uri,n).then((e=>{if(e&&i){let t,r,s,o;n.getMatchingSchemas(e.schema,i.offset).every((e=>{if(e.node===i&&!e.inverted&&e.schema&&(t=t||e.schema.title,r=r||e.schema.markdownDescription||tr(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(Wn(i));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=tr(e.schema.enumDescriptions[t])),s&&(o=e.schema.enum[t],"string"!=typeof o&&(o=JSON.stringify(o)))}return!0}));let l="";return t&&(l=tr(t)),r&&(l.length>0&&(l+="\n\n"),l+=r),s&&(l.length>0&&(l+="\n\n"),l+=`\`${function(e){if(-1!==e.indexOf("`"))return"`` "+e+" ``";return e}(o)}\`: ${s}`),a([l])}return null}))}};function tr(e){if(e){return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}var nr=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:Q.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const i=[],s={},o=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;s[t]||(s[t]=!0,i.push(e))},a=r=>{let s=n?.trailingCommas?or(n.trailingCommas):Q.Error,a=n?.comments?or(n.comments):this.commentSeverity,l=n?.schemaValidation?or(n.schemaValidation):Q.Warning,u=n?.schemaRequest?or(n.schemaRequest):Q.Warning;if(r){const i=(n,r)=>{if(t.root&&u){const i=t.root,s="object"===i.type?i.properties[0]:void 0;if(s&&"$schema"===s.keyNode.value){const t=s.valueNode||s,i=O.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));o(ne.create(i,n,u,r))}else{const t=O.create(e.positionAt(i.offset),e.positionAt(i.offset+1));o(ne.create(t,n,u,r))}}};if(r.errors.length)i(r.errors[0],mn.SchemaResolveError);else if(l){for(const e of r.warnings)i(e,mn.SchemaUnsupportedFeature);const s=t.validate(e,r.schema,l,n?.schemaDraft);s&&s.forEach(o)}ir(r.schema)&&(a=void 0),sr(r.schema)&&(s=void 0)}for(const e of t.syntaxErrors){if(e.code===mn.TrailingComma){if("number"!=typeof s)continue;e.severity=s}o(e)}if("number"==typeof a){const e=Nn("Comments are not permitted in JSON.");t.comments.forEach((t=>{o(ne.create(t,e,a,mn.CommentNotPermitted))}))}return i};if(r){const e=r.id||"schemaservice://untitled/"+rr++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},rr=0;function ir(e){if(e&&"object"==typeof e){if(rn(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=ir(t);if(rn(e))return e}}}function sr(e){if(e&&"object"==typeof e){if(rn(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(rn(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=sr(t);if(rn(e))return e}}}function or(e){switch(e){case"error":return Q.Error;case"warning":return Q.Warning;case"ignore":return}}var ar=48,lr=57,ur=65,cr=97,hr=102;function dr(e){return e=cr&&e<=hr?e-cr+10:0)}function fr(e){if("#"===e[0])switch(e.length){case 4:return{red:17*dr(e.charCodeAt(1))/255,green:17*dr(e.charCodeAt(2))/255,blue:17*dr(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*dr(e.charCodeAt(1))/255,green:17*dr(e.charCodeAt(2))/255,blue:17*dr(e.charCodeAt(3))/255,alpha:17*dr(e.charCodeAt(4))/255};case 7:return{red:(16*dr(e.charCodeAt(1))+dr(e.charCodeAt(2)))/255,green:(16*dr(e.charCodeAt(3))+dr(e.charCodeAt(4)))/255,blue:(16*dr(e.charCodeAt(5))+dr(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*dr(e.charCodeAt(1))+dr(e.charCodeAt(2)))/255,green:(16*dr(e.charCodeAt(3))+dr(e.charCodeAt(4)))/255,blue:(16*dr(e.charCodeAt(5))+dr(e.charCodeAt(6)))/255,alpha:(16*dr(e.charCodeAt(7))+dr(e.charCodeAt(8)))/255}}}var mr=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if(("vscode://defaultsettings/keybindings.json"===s||an(s.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const o of r.items)if("object"===o.type)for(const r of o.properties)if("key"===r.keyNode.value&&r.valueNode){const a=P.create(e.uri,gr(e,o));if(t.push({name:pr(r.valueNode),kind:Ye.Function,location:a}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),t}return t}const o=[{node:r,containerName:""}];let a=0,l=!1;const u=[],c=(t,n)=>{"array"===t.type?t.items.forEach((e=>{e&&o.push({node:e,containerName:n})})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(i>0){i--;const s=P.create(e.uri,gr(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:s,containerName:n}),o.push({node:r,containerName:a})}else l=!0}))};for(;a{"array"===t.type?t.items.forEach(((t,r)=>{if(t)if(i>0){i--;const s=gr(e,t),o=s,l={name:String(r),kind:this.getSymbolKind(t.type),range:s,selectionRange:o,children:[]};n.push(l),a.push({result:l.children,node:t})}else u=!0})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(i>0){i--;const s=gr(e,t),o=gr(e,t.keyNode),l=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:s,selectionRange:o,children:l,detail:this.getDetail(r)};n.push(u),a.push({result:l,node:r})}else u=!0}))};for(;l{const i=[];if(r){let s=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const o=t.getMatchingSchemas(r.schema),a={};for(const t of o)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const o=fr(Wn(t.node));if(o){const n=gr(e,t.node);i.push({color:o,range:n})}if(a[r]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i}))}getColorPresentations(e,t,n,r){const i=[],s=Math.round(255*n.red),o=Math.round(255*n.green),a=Math.round(255*n.blue);function l(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let u;return u=1===n.alpha?`#${l(s)}${l(o)}${l(a)}`:`#${l(s)}${l(o)}${l(a)}${l(Math.round(255*n.alpha))}`,i.push({label:u,textEdit:oe.replace(r,JSON.stringify(u))}),i}};function gr(e,t){return O.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function pr(e){return Wn(e)||Nn("")}var br,yr={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},vr={id:Nn("A unique identifier for the schema."),$schema:Nn("The schema to verify this document against."),title:Nn("A descriptive title of the element."),description:Nn("A long description of the element. Used in hover menus and suggestions."),default:Nn("A default value. Used by suggestions."),multipleOf:Nn("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:Nn("The maximum numerical value, inclusive by default."),exclusiveMaximum:Nn("Makes the maximum property exclusive."),minimum:Nn("The minimum numerical value, inclusive by default."),exclusiveMinimum:Nn("Makes the minimum property exclusive."),maxLength:Nn("The maximum length of a string."),minLength:Nn("The minimum length of a string."),pattern:Nn("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:Nn("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:Nn("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:Nn("The maximum number of items that can be inside an array. Inclusive."),minItems:Nn("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:Nn("If all of the items in the array must be unique. Defaults to false."),maxProperties:Nn("The maximum number of properties an object can have. Inclusive."),minProperties:Nn("The minimum number of properties an object can have. Inclusive."),required:Nn("An array of strings that lists the names of all properties required on this object."),additionalProperties:Nn("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:Nn("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:Nn("A map of property names to schemas for each property."),patternProperties:Nn("A map of regular expressions on property names to schemas for matching properties."),dependencies:Nn("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:Nn("The set of literal values that are valid."),type:Nn("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:Nn("Describes the format expected for the value."),allOf:Nn("An array of schemas, all of which must match."),anyOf:Nn("An array of schemas, where at least one must match."),oneOf:Nn("An array of schemas, exactly one of which must match."),not:Nn("A schema which must not match."),$id:Nn("A unique identifier for the schema."),$ref:Nn("Reference a definition hosted on any location."),$comment:Nn("Comments from schema authors to readers or maintainers of the schema."),readOnly:Nn("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:Nn("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:Nn('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:Nn("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:Nn("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:Nn("Describes the media type of a string property."),contentEncoding:Nn("Describes the content encoding of a string property."),if:Nn('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:Nn('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:Nn('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in yr.schemas){const t=yr.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=vr[e];r&&(n.description=r)}}(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;iu){if(47===n.charCodeAt(a+h))return n.slice(a+h+1);if(0===h)return n.slice(a+h)}else o>u&&(47===e.charCodeAt(i+h)?c=h:0===h&&(c=0));break}var d=e.charCodeAt(i+h);if(d!==n.charCodeAt(a+h))break;47===d&&(c=h)}var f="";for(h=i+c+1;h<=s;++h)h!==s&&47!==e.charCodeAt(h)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(a+c):(a+=c,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else-1===l&&(o=!1,l=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=l))}return i===s?s=l:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(s=!1,i=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return n=(t=e).dir||t.root,r=t.base||(t.name||"")+(t.ext||""),n?n===t.root?n+r:n+"/"+r:r;var t,n,r},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,l=-1,u=!0,c=e.length-1,h=0;c>=r;--c)if(47!==(i=e.charCodeAt(c)))-1===l&&(u=!1,l=c+1),46===i?-1===o?o=c:1!==h&&(h=1):-1!==o&&(h=-1);else if(!u){a=c+1;break}return-1===o||-1===l||0===h||1===h&&o===l-1&&o===a+1?-1!==l&&(n.base=n.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(a,o),n.base=e.slice(a,l)),n.ext=e.slice(o,l)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>c,Utils:()=>L}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.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(s.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 ("//")')}const a="",l="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,n||a),this.query=r||a,this.fragment=i||a,o(this,s))}get fsPath(){return p(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===i?i=this.query:null===i&&(i=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new d(t,n,r,i,s)}static parse(e,t=!1){const n=u.exec(e);return n?new d(n[2]||a,_(n[4]||a),_(n[5]||a),_(n[7]||a),_(n[9]||a),t):new d(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){const e=t.indexOf(l,2);-1===e?(n=t.substring(2),t=l):(n=t.substring(2,e),t=t.substring(e)||l)}return new d("file",n,t,a,a)}static from(e){const t=new d(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{const t=new d(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}const h=e?1:void 0;class d extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=p(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={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 m(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=f[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function g(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function b(e,t){const n=t?g:m;let r="",{scheme:i,authority:s,path:o,query:a,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=l,r+=l),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:m(u,!1,!1)),r}function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(e){return e.match(v)?e.replace(v,(e=>y(e))):e}var C=n(470);const S=C.posix||C,w="/";var L,N;(N=L||(L={})).joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},N.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==w&&(n=w+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===w&&!e.authority&&(i=i.substring(1)),e.with({path:i})},N.dirname=function(e){if(0===e.path.length||e.path===w)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},N.basename=function(e){return S.basename(e.path)},N.extname=function(e){return S.extname(e.path)}})(),br=r})();var{URI:_r,Utils:Cr}=br;function Sr(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const i=!!t&&!!t.extended,s=!!t&&!!t.globstar;let o=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let l;for(let e=0,t=n.length;e1&&("/"===t||void 0===t||"{"===t||","===t)&&("/"===u||void 0===u||","===u||"}"===u)?("/"===u?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}else r+=".*";break;default:r+=l}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}var wr,Lr,Nr=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:Sr("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=Mr(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},xr=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new Er(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Er=class{constructor(e,t=[]){this.schema=e,this.errors=t}},Ar=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return qn(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const i=ln(r);if(i?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},kr=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=_r.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=Tr(e)],r=Object.keys(this.schemasById).map((e=>this.schemasById[e]));for(;n.length;){const e=n.pop();for(let i=0;i{if(!t){const t=Nn("Unable to load schema from '{0}': No content.",Or(e));return new Er({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(Nn("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Or(e))),t=t.trimStart());let r={};const i=[];return r=Xt(t,i),i.length&&n.push(Nn("Unable to parse content from '{0}': Parse error at offset {1}.",Or(e),i[0].offset)),new Er(r,n)}),(t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),an(n,".")&&(n=n.substr(0,n.length-1)),new Er({},[Nn("Unable to load schema from '{0}': {1}.",Or(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let i=r.$schema?Tr(r.$schema):void 0;if("http://json-schema.org/draft-03/schema"===i)return this.promise.resolve(new Ar({},[Nn("Draft-03 schemas are not supported.")],[],i));let s=new Set;const o=this.contextService,a=(e,t,r,i)=>{let s;var o,a,l;void 0===i||0===i.length?s=t:"/"===i.charAt(0)?s=((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n})(t,i):(o=t,l=i,(a=r).anchors||(a.anchors=c(o)),s=a.anchors.get(l)),s?((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,s):n.push(Nn("$ref '{0}' in '{1}' can not be resolved.",i||"",r.uri))},l=(e,t,r,i)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=o.resolveRelativePath(t,i.uri)),t=Tr(t);const s=this.getOrAddSchemaHandle(t);return s.getUnresolvedSchema().then((o=>{if(i.dependencies.add(t),o.errors.length){const e=r?t+"#"+r:t;n.push(Nn("Problems loading reference '{0}': {1}",e,o.errors[0]))}return a(e,o.schema,s,r),u(e,o.schema,s)}))},u=(e,t,n)=>{const r=[];return this.traverseNodes(e,(e=>{const i=new Set;for(;e.$ref;){const s=e.$ref,o=s.split("#",2);if(delete e.$ref,o[0].length>0)return void r.push(l(e,o[0],o[1],n));if(!i.has(s)){const r=o[1];a(e,t,n,r),i.add(s)}}e.$recursiveRef&&s.add("$recursiveRef"),e.$dynamicRef&&s.add("$dynamicRef")})),this.promise.all(r)},c=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const r=e.$id||e.id,i=sn(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;i&&(t.has(i)?n.push(Nn("Duplicate anchor declaration: '{0}'",i)):t.set(i,e)),e.$recursiveAnchor&&s.add("$recursiveAnchor"),e.$dynamicAnchor&&s.add("$dynamicAnchor")})),t};return u(r,r,t).then((e=>{let t=[];return s.size&&t.push(Nn("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new Ar(r,n,t,i)}))}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)on(t)&&a.push(t)},i=(...e)=>{for(const t of e)if(on(t))for(const e in t){const n=t[e];on(n)&&a.push(n)}},s=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)on(e)&&a.push(e)},o=e=>{if(Array.isArray(e))for(const t of e)on(t)&&a.push(t);else on(e)&&a.push(e)},a=[e];let l=a.pop();for(;l;)n.has(l)||(n.add(l),t(l),r(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),i(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),s(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=Mr(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=Tr(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+Rr++;return this.addSchemaHandle(e,n).getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}},Rr=0;function Tr(e){try{return _r.parse(e).toString(!0)}catch(t){return e}}function Mr(e){try{return _r.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function Or(e){try{const t=_r.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function Ir(e,t){const n=[],r=[],i=[];let s=-1;const o=S(e.getText(),!1);let a=o.scan();function l(e){n.push(e),r.push(i.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(o.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};i.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(i.length>0&&i[i.length-1].kind===t){const t=i.pop(),n=e.positionAt(o.getTokenOffset()).line;t&&n>t.startLine+1&&s!==t.startLine&&(t.endLine=n-1,l(t),s=t.startLine)}break}case 13:{const t=e.positionAt(o.getTokenOffset()).line,n=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;1===o.getTokenError()&&t+1=0&&i[e].kind!==W.Region;)e--;if(e>=0){const t=i[e];i.length=e,n>t.startLine&&s!==t.startLine&&(t.endLine=n,l(t),s=t.startLine)}}}break}}a=o.scan()}const u=t&&t.rangeLimit;if("number"!=typeof u||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const c=[];for(let e of r)e<30&&(c[e]=(c[e]||0)+1);let h=0,d=0;for(let e=0;eu){d=e;break}h+=t}}const f=[];for(let e=0;e=e&&i<=t&&a.push(r(e,t)),a.push(r(o.offset,o.offset+o.length));break;case"number":case"boolean":case"null":case"property":a.push(r(o.offset,o.offset+o.length))}if("property"===o.type||o.parent&&"array"===o.parent.type){const e=s(o.offset+o.length,5);-1!==e&&a.push(r(o.offset,e))}o=o.parent}let l;for(let e=a.length-1;e>=0;e--)l=_t.create(a[e],l);return l||(l=_t.create(O.create(t,t))),l}))}function Fr(e,t,n){let r;if(n){const t=e.offsetAt(n.start);r={offset:t,length:e.offsetAt(n.end)-t}}const i={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return function(e,t,n){return g(e,t,n)}(e.getText(),r,i).map((t=>oe.replace(O.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}(Lr=wr||(wr={}))[Lr.Object=0]="Object",Lr[Lr.Array=1]="Array";var Vr=class{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:function(e,t,n){const r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(rs)return e.length;let o=0,a=e.length-1;for(;o<=a;){let r=a+o>>1,i=n(t,e[r]);if(i>0)o=r+1;else{if(!(i<0))return r;a=r-1}}return-o-1}(this.childrenProperties,e,Dr),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}};function Dr(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return nr?1:0}function qr(e,t){const n={...t,keepLines:!1},r=dn.applyEdits(e,Fr(e,n,void 0)),i=dn.create("test://test.json","json",0,r),s=function(e,t){if(0===t.childrenProperties.length)return e;const n=dn.create("test://test.json","json",0,e.getText()),r=[];Kr(r,t,t.beginningLineNumber);for(;r.length>0;){const t=r.shift(),i=t.propertyTreeArray;let s=t.beginningLineNumber;for(let t=0;t{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const i=r.valueNode.value,s=function(e,t){const n=function(e){if("#"===e)return[];if("#"!==e[0]||"/"!==e[1])return null;return e.substring(2).split(/\//).map(Hr)}(t);if(!n)return null;return zr(n,e.root)}(t,i);if(s){const t=e.positionAt(s.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:Wr(e,r.valueNode)})}}return!0})),Promise.resolve(n)}function Wr(e,t){return O.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function zr(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find((e=>e.keyNode.value===n));return r?zr(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),i=t.items[r];return i?zr(e,i):null}return null}function Hr(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Gr(e){const t=e.promiseConstructor||Promise,n=new kr(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(yr);const r=new Yn(n,e.contributions,t,e.clientCapabilities),i=new er(n,e.contributions,t),s=new mr(n),o=new nr(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),o.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:o.doValidation.bind(o),getLanguageStatus:o.getLanguageStatus.bind(o),parseJSONDocument:e=>Qn(e,{collectComments:!0}),newJSONDocument:(e,t)=>function(e,t=[]){return new Gn(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:Ir,getSelectionRanges:Pr,findDefinition:()=>Promise.resolve([]),findLinks:jr,format:(e,t,n)=>Fr(e,n,t),sort:(e,t)=>qr(e,t)}}"undefined"!=typeof fetch&&(Br=function(e){return fetch(e).then((e=>e.text()))});var Jr=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=Gr({workspaceContext:{resolveRelativePath:(e,t)=>function(e,t){if(function(e){return e.charCodeAt(0)===Xr}(t)){const n=_r.parse(e),r=t.split("/");return n.with({path:Zr(r)}).toString()}return function(e,...t){const n=_r.parse(e),r=n.path.split("/");for(let e of t)r.push(...e.split("/"));return n.with({path:Zr(r)}).toString()}(e,t)}(t.substr(0,t.lastIndexOf("/")+1),e)},schemaRequestService:t.enableSchemaRequest?Br:void 0,clientCapabilities:yn.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let e=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,e,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,r)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,r)}async format(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.format(r,t,n);return Promise.resolve(i)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(r)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Promise.resolve(r)}async getColorPresentations(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.parseJSONDocument(r),s=this._languageService.getColorPresentations(r,i,t,n);return Promise.resolve(s)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.getFoldingRanges(n,t);return Promise.resolve(r)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.getSelectionRanges(n,t,r);return Promise.resolve(i)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return dn.create(e,this._languageId,n.version,n.getValue());return null}},Xr="/".charCodeAt(0),Qr=".".charCodeAt(0);function Zr(e){const t=[];for(const n of e)0===n.length||1===n.length&&n.charCodeAt(0)===Qr||(2===n.length&&n.charCodeAt(0)===Qr&&n.charCodeAt(1)===Qr?t.pop():t.push(n));e.length>1&&0===e[e.length-1].length&&t.push("");let n=t.join("/");return 0===e[0].length&&(n="/"+n),n}self.onmessage=()=>{s.n(((e,t)=>new Jr(e,t)))}}();