@runeya/runeya 1.0.14 → 1.33.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node-red-contrib-runeya.tar +0 -0
- package/package.json +1 -1
- package/public/assets/{App-ClT0daRA.css → App-BVTb2f1U.css} +1 -1
- package/public/assets/App-havugOhG.js +101 -0
- package/public/assets/{CurrentEditor-BgkRP7cS.js → CurrentEditor-CGzL3h8U.js} +1 -1
- package/public/assets/{Editor-BqvrNzb6.js → Editor-DK3XKnCP.js} +6 -6
- package/public/assets/{ImportCreate-B-lRmpLH.js → ImportCreate-Byvpjnq0.js} +1 -1
- package/public/assets/{Init-D3C4n99F.js → Init-Dif9nNb1.js} +1 -1
- package/public/assets/{LeftLogo-E7dYCAWT.js → LeftLogo-Cbwhm4ku.js} +1 -1
- package/public/assets/{Markdown-dzyZ7CTg.js → Markdown-5TtJbvAz.js} +1 -1
- package/public/assets/{Overview-YtPSCN3k.js → Overview-Bl8fTVx6.js} +1 -1
- package/public/assets/{Section-YBL4Pzic.js → Section-DLhOQaZc.js} +1 -1
- package/public/assets/{Settings-DJaMzLUX.js → Settings-BjPflvt4.js} +1 -1
- package/public/assets/{StackChooser-DAAV0Rat.js → StackChooser-Dm1JVLNV.js} +1 -1
- package/public/assets/{StackChooser-BnNrvv4Y.js → StackChooser-jx7LDKIV.js} +1 -1
- package/public/assets/{StackMultiple-D0ozn0Tf.js → StackMultiple-kplS4h1T.js} +1 -1
- package/public/assets/{StackSingle-CHHH2rXO.js → StackSingle-vf02csuy.js} +1 -1
- package/public/assets/{Tabs-D9ZNelJj.js → Tabs-DnJSk4n2.js} +1 -1
- package/public/assets/{cssMode-BEnNoAFz.js → cssMode-BPdPLkVG.js} +1 -1
- package/public/assets/{freemarker2-z8zA5ezm.js → freemarker2-3NvUG45O.js} +1 -1
- package/public/assets/{handlebars-DTrkysaX.js → handlebars-CFHZlhgH.js} +1 -1
- package/public/assets/{html-BiGIRkmo.js → html-Bkw9bGL4.js} +1 -1
- package/public/assets/{htmlMode-CGj06Oa8.js → htmlMode-CRd0eLDO.js} +1 -1
- package/public/assets/{index-G1ob8hK0.js → index-CWdLNLf2.js} +2 -2
- package/public/assets/{javascript-DEAY-G4N.js → javascript-ByJcXg8C.js} +1 -1
- package/public/assets/{jsonMode-CLJTah_r.js → jsonMode-eQLqr7ag.js} +1 -1
- package/public/assets/{liquid-Bt_q9jyv.js → liquid-D7tDuX3T.js} +1 -1
- package/public/assets/{mdx-BtbMy52t.js → mdx-Ct31jTJm.js} +1 -1
- package/public/assets/{python-DIVYbK-C.js → python-B9O75g1L.js} +1 -1
- package/public/assets/{razor-ztrk2wBu.js → razor-CTgHL3xd.js} +1 -1
- package/public/assets/{router-B2S_D5pC.js → router-B5BHMCJX.js} +4 -4
- package/public/assets/{system-DYhoWbZ1.js → system-D6n39APF.js} +1 -1
- package/public/assets/{tsMode-Fc-Kxr3a.js → tsMode-D-YLfP_n.js} +1 -1
- package/public/assets/{typescript-CHa_3xkF.js → typescript-CjO-D8b6.js} +1 -1
- package/public/assets/{xml-B2WXRoPu.js → xml-D7AJmN-D.js} +1 -1
- package/public/assets/{yaml-6vYkUkh3.js → yaml-Ct88-2x6.js} +1 -1
- package/public/index.html +1 -1
- package/runeya.vsix +0 -0
- package/www.js +235 -173
- package/www.js.map +1 -1
- package/public/assets/App-Bzzr3d8D.js +0 -101
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/freemarker2-
|
|
2
|
-
import{b1 as ye,r as Z6,P as uH,j as hH,i as fH,b2 as pH,a as mH,o as gH}from"./index-G1ob8hK0.js";import{_ as _H}from"./_plugin-vue_export-helper-DlAUqK2U.js";function Io(o,e=0){return o[o.length-(1+e)]}function yH(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function gn(o,e,t=(n,i)=>n===i){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let n=0,i=o.length;n<i;n++)if(!t(o[n],e[n]))return!1;return!0}function bH(o,e){const t=o.length-1;e<t&&(o[e]=o[t]),o.pop()}function $_(o,e,t){return vH(o.length,n=>t(o[n],e))}function vH(o,e){let t=0,n=o-1;for(;t<=n;){const i=(t+n)/2|0,r=e(i);if(r<0)t=i+1;else if(r>0)n=i-1;else return i}return-(t+1)}function oT(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const n=e[Math.floor(e.length*Math.random())],i=[],r=[],s=[];for(const a of e){const l=t(a,n);l<0?i.push(a):l>0?r.push(a):s.push(a)}return o<i.length?oT(o,i,t):o<i.length+s.length?s[0]:oT(o-(i.length+s.length),r,t)}function eM(o,e){const t=[];let n;for(const i of o.slice(0).sort(e))!n||e(n[0],i)!==0?(n=[i],t.push(n)):n.push(i);return t}function*SD(o,e){let t,n;for(const i of o)n!==void 0&&e(n,i)?t.push(i):(t&&(yield t),t=[i]),n=i;t&&(yield t)}function sP(o,e){for(let t=0;t<=o.length;t++)e(t===0?void 0:o[t-1],t===o.length?void 0:o[t])}function SH(o,e){for(let t=0;t<o.length;t++)e(t===0?void 0:o[t-1],o[t],t+1===o.length?void 0:o[t+1])}function na(o){return o.filter(e=>!!e)}function tM(o){let e=0;for(let t=0;t<o.length;t++)o[t]&&(o[e]=o[t],e+=1);o.length=e}function aP(o){return!Array.isArray(o)||o.length===0}function Fi(o){return Array.isArray(o)&&o.length>0}function Nd(o,e=t=>t){const t=new Set;return o.filter(n=>{const i=e(n);return t.has(i)?!1:(t.add(i),!0)})}function wD(o,e){return o.length>0?o[0]:e}function tr(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const n=[];if(t<=e)for(let i=t;i<e;i++)n.push(i);else for(let i=t;i>e;i--)n.push(i);return n}function Dw(o,e,t){const n=o.slice(0,e),i=o.slice(e);return n.concat(t,i)}function ex(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function vy(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function sT(o,e){for(const t of e)o.push(t)}function CD(o){return Array.isArray(o)?o:[o]}function wH(o,e,t){const n=lP(o,e),i=o.length,r=t.length;o.length=i+r;for(let s=i-1;s>=n;s--)o[s+r]=o[s];for(let s=0;s<r;s++)o[s+n]=t[s]}function nM(o,e,t,n){const i=lP(o,e);let r=o.splice(i,t);return r===void 0&&(r=[]),wH(o,i,n),r}function lP(o,e){return e<0?Math.max(e+o.length,0):Math.min(e,o.length)}var J_;(function(o){function e(r){return r<0}o.isLessThan=e;function t(r){return r<=0}o.isLessThanOrEqual=t;function n(r){return r>0}o.isGreaterThan=n;function i(r){return r===0}o.isNeitherLessOrGreaterThan=i,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(J_||(J_={}));function Wo(o,e){return(t,n)=>e(o(t),o(n))}function CH(...o){return(e,t)=>{for(const n of o){const i=n(e,t);if(!J_.isNeitherLessOrGreaterThan(i))return i}return J_.neitherLessOrGreaterThan}}const ac=(o,e)=>o-e,EH=(o,e)=>ac(o?1:0,e?1:0);function cP(o){return(e,t)=>-o(e,t)}class gc{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class il{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new il(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new il(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(i=>((n||J_.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0)),t}}il.empty=new il(o=>{});function dr(o){return typeof o=="string"}function sr(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function xH(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function Rd(o){return typeof o=="number"&&!isNaN(o)}function iM(o){return!!o&&typeof o[Symbol.iterator]=="function"}function dP(o){return o===!0||o===!1}function Wr(o){return typeof o>"u"}function Ch(o){return!co(o)}function co(o){return Wr(o)||o===null}function Lt(o,e){if(!o)throw new Error("Unexpected type")}function Zc(o){if(co(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function X_(o){return typeof o=="function"}function TH(o,e){const t=Math.min(o.length,e.length);for(let n=0;n<t;n++)LH(o[n],e[n])}function LH(o,e){if(dr(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(X_(e)){try{if(o instanceof e)return}catch{}if(!co(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Ul(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.entries(o).forEach(([t,n])=>{e[t]=n&&typeof n=="object"?Ul(n):n}),e}function kH(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const n in t)if(uP.call(t,n)){const i=t[n];typeof i=="object"&&!Object.isFrozen(i)&&!xH(i)&&e.push(i)}}return o}const uP=Object.prototype.hasOwnProperty;function hP(o,e){return aT(o,e,new Set)}function aT(o,e,t){if(co(o))return o;const n=e(o);if(typeof n<"u")return n;if(Array.isArray(o)){const i=[];for(const r of o)i.push(aT(r,e,t));return i}if(sr(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const i={};for(const r in o)uP.call(o,r)&&(i[r]=aT(o[r],e,t));return t.delete(o),i}return o}function Nw(o,e,t=!0){return sr(o)?(sr(e)&&Object.keys(e).forEach(n=>{n in o?t&&(sr(o[n])&&sr(e[n])?Nw(o[n],e[n],t):o[n]=e[n]):o[n]=e[n]}),o):e}function yo(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t<o.length;t++)if(!yo(o[t],e[t]))return!1}else{const i=[];for(n in o)i.push(n);i.sort();const r=[];for(n in e)r.push(n);if(r.sort(),!yo(i,r))return!1;for(t=0;t<i.length;t++)if(!yo(o[i[t]],e[i[t]]))return!1}return!0}function AH(o){let e=[];for(;Object.prototype!==o;)e=e.concat(Object.getOwnPropertyNames(o)),o=Object.getPrototypeOf(o);return e}function ED(o){const e=[];for(const t of AH(o))typeof o[t]=="function"&&e.push(t);return e}function IH(o,e){const t=i=>function(){const r=Array.prototype.slice.call(arguments,0);return e(i,r)},n={};for(const i of o)n[i]=t(i);return n}let DH=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function fP(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(n,i)=>{const r=i[0],s=e[r];let a=n;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),DH&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return fP(e,t)}function Br(o,e,...t){const n=fP(e,t);return{value:n,original:n}}var tx;const Qf="en";let kv=!1,Av=!1,Gb=!1,pP=!1,xD=!1,TD=!1,mP=!1,Sy,zb=Qf,rM=Qf,NH,Is;const lc=globalThis;let nr;typeof lc.vscode<"u"&&typeof lc.vscode.process<"u"?nr=lc.vscode.process:typeof process<"u"&&(nr=process);const RH=typeof((tx=nr==null?void 0:nr.versions)===null||tx===void 0?void 0:tx.electron)=="string",MH=RH&&(nr==null?void 0:nr.type)==="renderer";if(typeof nr=="object"){kv=nr.platform==="win32",Av=nr.platform==="darwin",Gb=nr.platform==="linux",Gb&&nr.env.SNAP&&nr.env.SNAP_REVISION,nr.env.CI||nr.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Sy=Qf,zb=Qf;const o=nr.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];Sy=e.locale,rM=e.osLocale,zb=t||Qf,NH=e._translationsConfigFile}catch{}pP=!0}else typeof navigator=="object"&&!MH?(Is=navigator.userAgent,kv=Is.indexOf("Windows")>=0,Av=Is.indexOf("Macintosh")>=0,TD=(Is.indexOf("Macintosh")>=0||Is.indexOf("iPad")>=0||Is.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Gb=Is.indexOf("Linux")>=0,mP=(Is==null?void 0:Is.indexOf("Mobi"))>=0,xD=!0,m({},"_"),Sy=Qf,zb=Sy,rM=navigator.language):console.error("Unable to resolve platform.");const Bi=kv,at=Av,hr=Gb,dl=pP,au=xD,OH=xD&&typeof lc.importScripts=="function",PH=OH?lc.origin:void 0,ia=TD,gP=mP,ul=Is,FH=zb,BH=typeof lc.postMessage=="function"&&!lc.importScripts,_P=(()=>{if(BH){const o=[];lc.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=o.length;n<i;n++){const r=o[n];if(r.id===t.data.vscodeScheduleAsyncWork){o.splice(n,1),r.callback();return}}});let e=0;return t=>{const n=++e;o.push({id:n,callback:t}),lc.postMessage({vscodeScheduleAsyncWork:n},"*")}}return o=>setTimeout(o)})(),mo=Av||TD?2:kv?1:3;let oM=!0,sM=!1;function yP(){if(!sM){sM=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,oM=new Uint16Array(o.buffer)[0]===513}return oM}const bP=!!(ul&&ul.indexOf("Chrome")>=0),VH=!!(ul&&ul.indexOf("Firefox")>=0),WH=!!(!bP&&ul&&ul.indexOf("Safari")>=0),UH=!!(ul&&ul.indexOf("Edg/")>=0),HH=!!(ul&&ul.indexOf("Android")>=0),Oi={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var lt;(function(o){function e(v){return v&&typeof v=="object"&&typeof v[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function n(){return t}o.empty=n;function*i(v){yield v}o.single=i;function r(v){return e(v)?v:i(v)}o.wrap=r;function s(v){return v||t}o.from=s;function*a(v){for(let S=v.length-1;S>=0;S--)yield v[S]}o.reverse=a;function l(v){return!v||v[Symbol.iterator]().next().done===!0}o.isEmpty=l;function c(v){return v[Symbol.iterator]().next().value}o.first=c;function d(v,S){for(const w of v)if(S(w))return!0;return!1}o.some=d;function u(v,S){for(const w of v)if(S(w))return w}o.find=u;function*h(v,S){for(const w of v)S(w)&&(yield w)}o.filter=h;function*f(v,S){let w=0;for(const E of v)yield S(E,w++)}o.map=f;function*p(...v){for(const S of v)yield*S}o.concat=p;function g(v,S,w){let E=w;for(const x of v)E=S(E,x);return E}o.reduce=g;function*_(v,S,w=v.length){for(S<0&&(S+=v.length),w<0?w+=v.length:w>v.length&&(w=v.length);S<w;S++)yield v[S]}o.slice=_;function y(v,S=Number.POSITIVE_INFINITY){const w=[];if(S===0)return[w,v];const E=v[Symbol.iterator]();for(let x=0;x<S;x++){const k=E.next();if(k.done)return[w,o.empty()];w.push(k.value)}return[w,{[Symbol.iterator](){return E}}]}o.consume=y;async function b(v){const S=[];for await(const w of v)S.push(w);return Promise.resolve(S)}o.asyncToArray=b})(lt||(lt={}));let Wn=class lT{constructor(e){this.element=e,this.next=lT.Undefined,this.prev=lT.Undefined}};Wn.Undefined=new Wn(void 0);class ar{constructor(){this._first=Wn.Undefined,this._last=Wn.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Wn.Undefined}clear(){let e=this._first;for(;e!==Wn.Undefined;){const t=e.next;e.prev=Wn.Undefined,e.next=Wn.Undefined,e=t}this._first=Wn.Undefined,this._last=Wn.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new Wn(e);if(this._first===Wn.Undefined)this._first=n,this._last=n;else if(t){const r=this._last;this._last=n,n.prev=r,r.next=n}else{const r=this._first;this._first=n,n.next=r,r.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==Wn.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Wn.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Wn.Undefined&&e.next!==Wn.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Wn.Undefined&&e.next===Wn.Undefined?(this._first=Wn.Undefined,this._last=Wn.Undefined):e.next===Wn.Undefined?(this._last=this._last.prev,this._last.next=Wn.Undefined):e.prev===Wn.Undefined&&(this._first=this._first.next,this._first.prev=Wn.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Wn.Undefined;)yield e.element,e=e.next}}const vP="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function GH(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of vP)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const LD=GH();function kD(o){let e=LD;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const SP=new ar;SP.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Y_(o,e,t,n,i){if(e=kD(e),i||(i=lt.first(SP)),t.length>i.maxLen){let c=o-i.maxLen/2;return c<0?c=0:n+=c,t=t.substring(c,o+i.maxLen/2),Y_(o,e,t,n,i)}const r=Date.now(),s=o-1-n;let a=-1,l=null;for(let c=1;!(Date.now()-r>=i.timeBudget);c++){const d=s-i.windowSize*c;e.lastIndex=Math.max(0,d);const u=zH(e,t,s,a);if(!u&&l||(l=u,d<=0))break;a=d}if(l){const c={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function zH(o,e,t,n){let i;for(;i=o.exec(e);){const r=i.index||0;if(r<=t&&o.lastIndex>=t)return i;if(n>0&&r>n)return null}return null}const Mc=8;class wP{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class CP{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class nn{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return Rw(e,t)}compute(e,t,n){return n}}class p_{constructor(e,t){this.newValue=e,this.didChange=t}}function Rw(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new p_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const n=Array.isArray(o)&&Array.isArray(e)&&gn(o,e);return new p_(e,!n)}let t=!1;for(const n in e)if(e.hasOwnProperty(n)){const i=Rw(o[n],e[n]);i.didChange&&(o[n]=i.newValue,t=!0)}return new p_(o,t)}class T0{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return Rw(e,t)}validate(e){return this.defaultValue}}class Um{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return Rw(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}}function Se(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class ht extends Um{constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="boolean",i.default=n),super(e,t,n,i)}validate(e){return Se(e,this.defaultValue)}}function Bu(o,e,t,n){if(typeof o>"u")return e;let i=parseInt(o,10);return isNaN(i)?e:(i=Math.max(t,i),i=Math.min(n,i),i|0)}class Rt extends Um{static clampedInt(e,t,n,i){return Bu(e,t,n,i)}constructor(e,t,n,i,r,s=void 0){typeof s<"u"&&(s.type="integer",s.default=n,s.minimum=i,s.maximum=r),super(e,t,n,s),this.minimum=i,this.maximum=r}validate(e){return Rt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function jH(o,e,t,n){if(typeof o>"u")return e;const i=ds.float(o,e);return ds.clamp(i,t,n)}class ds extends Um{static clamp(e,t,n){return e<t?t:e>n?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,i,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=i}validate(e){return this.validationFn(ds.float(e,this.defaultValue))}}class Cr extends Um{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="string",i.default=n),super(e,t,n,i)}validate(e){return Cr.string(e,this.defaultValue)}}function Cn(o,e,t,n){return typeof o!="string"?e:n&&o in n?n[o]:t.indexOf(o)===-1?e:o}class on extends Um{constructor(e,t,n,i,r=void 0){typeof r<"u"&&(r.type="string",r.enum=i,r.default=n),super(e,t,n,r),this._allowedValues=i}validate(e){return Cn(e,this.defaultValue,this._allowedValues)}}class wy extends nn{constructor(e,t,n,i,r,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=r,a.default=i),super(e,t,n,a),this._allowedValues=r,this._convert=s}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function KH(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class qH extends nn{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","Optimize for usage with a Screen Reader."),m("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:m("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}}class $H extends nn{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Se(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Se(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function JH(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var gi;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(gi||(gi={}));function XH(o){switch(o){case"line":return gi.Line;case"block":return gi.Block;case"underline":return gi.Underline;case"line-thin":return gi.LineThin;case"block-outline":return gi.BlockOutline;case"underline-thin":return gi.UnderlineThin}}class YH extends T0{constructor(){super(140)}compute(e,t,n){const i=["monaco-editor"];return t.get(39)&&i.push(t.get(39)),e.extraEditorClassName&&i.push(e.extraEditorClassName),t.get(73)==="default"?i.push("mouse-default"):t.get(73)==="copy"&&i.push("mouse-copy"),t.get(110)&&i.push("showUnused"),t.get(138)&&i.push("showDeprecated"),i.join(" ")}}class QH extends ht{constructor(){super(37,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}class ZH extends nn{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:at},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Se(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Cn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Cn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Se(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Se(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Se(t.loop,this.defaultValue.loop)}}}class uo extends nn{constructor(){super(51,"fontLigatures",uo.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?uo.OFF:e==="true"?uo.ON:e:e?uo.ON:uo.OFF}}uo.OFF='"liga" off, "calt" off';uo.ON='"liga" on, "calt" on';class js extends nn{constructor(){super(54,"fontVariations",js.OFF,{anyOf:[{type:"boolean",description:m("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:m("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:m("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?js.OFF:e==="true"?js.TRANSLATE:e:e?js.TRANSLATE:js.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}}js.OFF="normal";js.TRANSLATE="translate";class eG extends T0{constructor(){super(50)}compute(e,t,n){return e.fontInfo}}class tG extends Um{constructor(){super(52,"fontSize",kr.fontSize,{type:"number",minimum:6,maximum:100,default:kr.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){const t=ds.float(e,this.defaultValue);return t===0?kr.fontSize:ds.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}class Ba extends nn{constructor(){super(53,"fontWeight",kr.fontWeight,{anyOf:[{type:"number",minimum:Ba.MINIMUM_VALUE,maximum:Ba.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Ba.SUGGESTION_VALUES}],default:kr.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Rt.clampedInt(e,kr.fontWeight,Ba.MINIMUM_VALUE,Ba.MAXIMUM_VALUE))}}Ba.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Ba.MINIMUM_VALUE=1;Ba.MAXIMUM_VALUE=1e3;class nG extends nn{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),m("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:m("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:m("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:m("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:m("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:m("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:m("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,i,r,s;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Cn(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Cn(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=a.multipleTypeDefinitions)!==null&&n!==void 0?n:Cn(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(i=a.multipleDeclarations)!==null&&i!==void 0?i:Cn(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(r=a.multipleImplementations)!==null&&r!==void 0?r:Cn(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(s=a.multipleReferences)!==null&&s!==void 0?s:Cn(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Cr.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Cr.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Cr.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Cr.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Cr.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class iG extends nn{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:m("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:m("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),delay:Rt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Se(t.sticky,this.defaultValue.sticky),hidingDelay:Rt.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Se(t.above,this.defaultValue.above)}}}class wp extends T0{constructor(){super(143)}compute(e,t,n){return wp.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight);let i=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(i=Math.max(i,t-1));const r=(n+e.viewLineCount+i)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:i,desiredRatio:r,minimapLineCount:s}}static _computeMinimapLayout(e,t){const n=e.outerWidth,i=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};const s=t.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,p=e.minimap.size,g=e.minimap.side,_=e.verticalScrollbarWidth,y=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,S=u?2:3;let w=Math.floor(r*i);const E=w/r;let x=!1,k=!1,D=S*h,B=h/r,O=1;if(p==="fill"||p==="fit"){const{typicalViewportLineCount:Ie,extraLinesBeforeFirstLine:me,extraLinesBeyondLastLine:Ge,desiredRatio:Ve,minimapLineCount:Ee}=wp.computeContainedMinimapLineCount({viewLineCount:y,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:i,lineHeight:l,pixelRatio:r});if(y/Ee>1)x=!0,k=!0,h=1,D=1,B=h/r;else{let Ln=!1,Qi=h+1;if(p==="fit"){const zn=Math.ceil((me+y+Ge)*D);v&&a&&b<=t.stableFitRemainingWidth?(Ln=!0,Qi=t.stableFitMaxMinimapScale):Ln=zn>w}if(p==="fill"||Ln){x=!0;const zn=h;D=Math.min(l*r,Math.max(1,Math.floor(1/Ve))),v&&a&&b<=t.stableFitRemainingWidth&&(Qi=t.stableFitMaxMinimapScale),h=Math.min(Qi,Math.max(1,Math.floor(D/S))),h>zn&&(O=Math.min(2,h/zn)),B=h/r/O,w=Math.ceil(Math.max(Ie,me+y+Ge)*D),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const M=Math.floor(f*B),V=Math.min(M,Math.max(0,Math.floor((b-_-2)*B/(c+B)))+Mc);let $=Math.floor(r*V);const Q=$/r;$=Math.floor($*O);const ge=u?1:2,we=g==="left"?0:n-V-_;return{renderMinimap:ge,minimapLeft:we,minimapWidth:V,minimapHeightIsEditorHeight:x,minimapIsSampling:k,minimapScale:h,minimapLineHeight:D,minimapCanvasInnerWidth:$,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:Q,minimapCanvasOuterHeight:E}}static computeLayout(e,t){const n=t.outerWidth|0,i=t.outerHeight|0,r=t.lineHeight|0,s=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,u=e.get(135),h=u==="inherit"?e.get(134):u,f=h==="inherit"?e.get(130):h,p=e.get(133),g=t.isDominatedByLongLines,_=e.get(57),y=e.get(67).renderType!==0,b=e.get(68),v=e.get(104),S=e.get(83),w=e.get(72),E=e.get(102),x=E.verticalScrollbarSize,k=E.verticalHasArrows,D=E.arrowSize,B=E.horizontalScrollbarSize,O=e.get(43),M=e.get(109)!=="never";let V=e.get(65);O&&M&&(V+=16);let $=0;if(y){const $n=Math.max(s,b);$=Math.round($n*l)}let Q=0;_&&(Q=r*t.glyphMarginDecorationLaneCount);let ge=0,we=ge+Q,Ie=we+$,me=Ie+V;const Ge=n-Q-$-V;let Ve=!1,Ee=!1,he=-1;h==="inherit"&&g?(Ve=!0,Ee=!0):f==="on"||f==="bounded"?Ee=!0:f==="wordWrapColumn"&&(he=p);const Ln=wp._computeMinimapLayout({outerWidth:n,outerHeight:i,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:v,paddingTop:S.top,paddingBottom:S.bottom,minimap:w,verticalScrollbarWidth:x,viewLineCount:d,remainingWidth:Ge,isViewportWrapping:Ee},t.memory||new CP);Ln.renderMinimap!==0&&Ln.minimapLeft===0&&(ge+=Ln.minimapWidth,we+=Ln.minimapWidth,Ie+=Ln.minimapWidth,me+=Ln.minimapWidth);const Qi=Ge-Ln.minimapWidth,zn=Math.max(1,Math.floor((Qi-x-2)/a)),wt=k?D:0;return Ee&&(he=Math.max(1,zn),f==="bounded"&&(he=Math.min(he,p))),{width:n,height:i,glyphMarginLeft:ge,glyphMarginWidth:Q,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:we,lineNumbersWidth:$,decorationsLeft:Ie,decorationsWidth:V,contentLeft:me,contentWidth:Qi,minimap:Ln,viewportColumn:zn,isWordWrapMinified:Ve,isViewportWrapping:Ee,wrappingColumn:he,verticalScrollbarWidth:x,horizontalScrollbarHeight:B,overviewRuler:{top:wt,width:x,height:i-2*wt,right:0}}}}class rG extends nn{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:m("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Cn(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}}var as;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(as||(as={}));class oG extends nn{constructor(){const e={enabled:as.OnCode};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[as.Off,as.OnCode,as.On],default:e.enabled,enumDescriptions:[m("editor.lightbulb.enabled.off","Disable the code action menu."),m("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),m("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:m("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Cn(e.enabled,this.defaultValue.enabled,[as.Off,as.OnCode,as.On])}}}class sG extends nn{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:m("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:m("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:m("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:m("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),maxLineCount:Rt.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Cn(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Se(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class aG extends nn{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m("editor.inlayHints.on","Inlay hints are enabled"),m("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:m("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Cn(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Rt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Cr.string(t.fontFamily,this.defaultValue.fontFamily),padding:Se(t.padding,this.defaultValue.padding)}}}class lG extends nn{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Rt.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Rt.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}}class cG extends ds{constructor(){super(66,"lineHeight",kr.lineHeight,e=>ds.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/freemarker2-3NvUG45O.js","assets/index-CWdLNLf2.js","assets/index-CqmUSPWF.css","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/handlebars-CFHZlhgH.js","assets/html-Bkw9bGL4.js","assets/javascript-ByJcXg8C.js","assets/typescript-CjO-D8b6.js","assets/liquid-D7tDuX3T.js","assets/mdx-Ct31jTJm.js","assets/python-B9O75g1L.js","assets/razor-CTgHL3xd.js","assets/xml-D7AJmN-D.js","assets/yaml-Ct88-2x6.js","assets/cssMode-BPdPLkVG.js","assets/htmlMode-CRd0eLDO.js","assets/jsonMode-eQLqr7ag.js","assets/tsMode-D-YLfP_n.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{b1 as ye,r as Z6,P as uH,j as hH,i as fH,b2 as pH,a as mH,o as gH}from"./index-CWdLNLf2.js";import{_ as _H}from"./_plugin-vue_export-helper-DlAUqK2U.js";function Io(o,e=0){return o[o.length-(1+e)]}function yH(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function gn(o,e,t=(n,i)=>n===i){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let n=0,i=o.length;n<i;n++)if(!t(o[n],e[n]))return!1;return!0}function bH(o,e){const t=o.length-1;e<t&&(o[e]=o[t]),o.pop()}function $_(o,e,t){return vH(o.length,n=>t(o[n],e))}function vH(o,e){let t=0,n=o-1;for(;t<=n;){const i=(t+n)/2|0,r=e(i);if(r<0)t=i+1;else if(r>0)n=i-1;else return i}return-(t+1)}function oT(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const n=e[Math.floor(e.length*Math.random())],i=[],r=[],s=[];for(const a of e){const l=t(a,n);l<0?i.push(a):l>0?r.push(a):s.push(a)}return o<i.length?oT(o,i,t):o<i.length+s.length?s[0]:oT(o-(i.length+s.length),r,t)}function eM(o,e){const t=[];let n;for(const i of o.slice(0).sort(e))!n||e(n[0],i)!==0?(n=[i],t.push(n)):n.push(i);return t}function*SD(o,e){let t,n;for(const i of o)n!==void 0&&e(n,i)?t.push(i):(t&&(yield t),t=[i]),n=i;t&&(yield t)}function sP(o,e){for(let t=0;t<=o.length;t++)e(t===0?void 0:o[t-1],t===o.length?void 0:o[t])}function SH(o,e){for(let t=0;t<o.length;t++)e(t===0?void 0:o[t-1],o[t],t+1===o.length?void 0:o[t+1])}function na(o){return o.filter(e=>!!e)}function tM(o){let e=0;for(let t=0;t<o.length;t++)o[t]&&(o[e]=o[t],e+=1);o.length=e}function aP(o){return!Array.isArray(o)||o.length===0}function Fi(o){return Array.isArray(o)&&o.length>0}function Nd(o,e=t=>t){const t=new Set;return o.filter(n=>{const i=e(n);return t.has(i)?!1:(t.add(i),!0)})}function wD(o,e){return o.length>0?o[0]:e}function tr(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const n=[];if(t<=e)for(let i=t;i<e;i++)n.push(i);else for(let i=t;i>e;i--)n.push(i);return n}function Dw(o,e,t){const n=o.slice(0,e),i=o.slice(e);return n.concat(t,i)}function ex(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function vy(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function sT(o,e){for(const t of e)o.push(t)}function CD(o){return Array.isArray(o)?o:[o]}function wH(o,e,t){const n=lP(o,e),i=o.length,r=t.length;o.length=i+r;for(let s=i-1;s>=n;s--)o[s+r]=o[s];for(let s=0;s<r;s++)o[s+n]=t[s]}function nM(o,e,t,n){const i=lP(o,e);let r=o.splice(i,t);return r===void 0&&(r=[]),wH(o,i,n),r}function lP(o,e){return e<0?Math.max(e+o.length,0):Math.min(e,o.length)}var J_;(function(o){function e(r){return r<0}o.isLessThan=e;function t(r){return r<=0}o.isLessThanOrEqual=t;function n(r){return r>0}o.isGreaterThan=n;function i(r){return r===0}o.isNeitherLessOrGreaterThan=i,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(J_||(J_={}));function Wo(o,e){return(t,n)=>e(o(t),o(n))}function CH(...o){return(e,t)=>{for(const n of o){const i=n(e,t);if(!J_.isNeitherLessOrGreaterThan(i))return i}return J_.neitherLessOrGreaterThan}}const ac=(o,e)=>o-e,EH=(o,e)=>ac(o?1:0,e?1:0);function cP(o){return(e,t)=>-o(e,t)}class gc{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class il{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new il(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new il(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(i=>((n||J_.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0)),t}}il.empty=new il(o=>{});function dr(o){return typeof o=="string"}function sr(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function xH(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function Rd(o){return typeof o=="number"&&!isNaN(o)}function iM(o){return!!o&&typeof o[Symbol.iterator]=="function"}function dP(o){return o===!0||o===!1}function Wr(o){return typeof o>"u"}function Ch(o){return!co(o)}function co(o){return Wr(o)||o===null}function Lt(o,e){if(!o)throw new Error("Unexpected type")}function Zc(o){if(co(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function X_(o){return typeof o=="function"}function TH(o,e){const t=Math.min(o.length,e.length);for(let n=0;n<t;n++)LH(o[n],e[n])}function LH(o,e){if(dr(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(X_(e)){try{if(o instanceof e)return}catch{}if(!co(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Ul(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.entries(o).forEach(([t,n])=>{e[t]=n&&typeof n=="object"?Ul(n):n}),e}function kH(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const n in t)if(uP.call(t,n)){const i=t[n];typeof i=="object"&&!Object.isFrozen(i)&&!xH(i)&&e.push(i)}}return o}const uP=Object.prototype.hasOwnProperty;function hP(o,e){return aT(o,e,new Set)}function aT(o,e,t){if(co(o))return o;const n=e(o);if(typeof n<"u")return n;if(Array.isArray(o)){const i=[];for(const r of o)i.push(aT(r,e,t));return i}if(sr(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const i={};for(const r in o)uP.call(o,r)&&(i[r]=aT(o[r],e,t));return t.delete(o),i}return o}function Nw(o,e,t=!0){return sr(o)?(sr(e)&&Object.keys(e).forEach(n=>{n in o?t&&(sr(o[n])&&sr(e[n])?Nw(o[n],e[n],t):o[n]=e[n]):o[n]=e[n]}),o):e}function yo(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t<o.length;t++)if(!yo(o[t],e[t]))return!1}else{const i=[];for(n in o)i.push(n);i.sort();const r=[];for(n in e)r.push(n);if(r.sort(),!yo(i,r))return!1;for(t=0;t<i.length;t++)if(!yo(o[i[t]],e[i[t]]))return!1}return!0}function AH(o){let e=[];for(;Object.prototype!==o;)e=e.concat(Object.getOwnPropertyNames(o)),o=Object.getPrototypeOf(o);return e}function ED(o){const e=[];for(const t of AH(o))typeof o[t]=="function"&&e.push(t);return e}function IH(o,e){const t=i=>function(){const r=Array.prototype.slice.call(arguments,0);return e(i,r)},n={};for(const i of o)n[i]=t(i);return n}let DH=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function fP(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(n,i)=>{const r=i[0],s=e[r];let a=n;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),DH&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return fP(e,t)}function Br(o,e,...t){const n=fP(e,t);return{value:n,original:n}}var tx;const Qf="en";let kv=!1,Av=!1,Gb=!1,pP=!1,xD=!1,TD=!1,mP=!1,Sy,zb=Qf,rM=Qf,NH,Is;const lc=globalThis;let nr;typeof lc.vscode<"u"&&typeof lc.vscode.process<"u"?nr=lc.vscode.process:typeof process<"u"&&(nr=process);const RH=typeof((tx=nr==null?void 0:nr.versions)===null||tx===void 0?void 0:tx.electron)=="string",MH=RH&&(nr==null?void 0:nr.type)==="renderer";if(typeof nr=="object"){kv=nr.platform==="win32",Av=nr.platform==="darwin",Gb=nr.platform==="linux",Gb&&nr.env.SNAP&&nr.env.SNAP_REVISION,nr.env.CI||nr.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Sy=Qf,zb=Qf;const o=nr.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];Sy=e.locale,rM=e.osLocale,zb=t||Qf,NH=e._translationsConfigFile}catch{}pP=!0}else typeof navigator=="object"&&!MH?(Is=navigator.userAgent,kv=Is.indexOf("Windows")>=0,Av=Is.indexOf("Macintosh")>=0,TD=(Is.indexOf("Macintosh")>=0||Is.indexOf("iPad")>=0||Is.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Gb=Is.indexOf("Linux")>=0,mP=(Is==null?void 0:Is.indexOf("Mobi"))>=0,xD=!0,m({},"_"),Sy=Qf,zb=Sy,rM=navigator.language):console.error("Unable to resolve platform.");const Bi=kv,at=Av,hr=Gb,dl=pP,au=xD,OH=xD&&typeof lc.importScripts=="function",PH=OH?lc.origin:void 0,ia=TD,gP=mP,ul=Is,FH=zb,BH=typeof lc.postMessage=="function"&&!lc.importScripts,_P=(()=>{if(BH){const o=[];lc.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=o.length;n<i;n++){const r=o[n];if(r.id===t.data.vscodeScheduleAsyncWork){o.splice(n,1),r.callback();return}}});let e=0;return t=>{const n=++e;o.push({id:n,callback:t}),lc.postMessage({vscodeScheduleAsyncWork:n},"*")}}return o=>setTimeout(o)})(),mo=Av||TD?2:kv?1:3;let oM=!0,sM=!1;function yP(){if(!sM){sM=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,oM=new Uint16Array(o.buffer)[0]===513}return oM}const bP=!!(ul&&ul.indexOf("Chrome")>=0),VH=!!(ul&&ul.indexOf("Firefox")>=0),WH=!!(!bP&&ul&&ul.indexOf("Safari")>=0),UH=!!(ul&&ul.indexOf("Edg/")>=0),HH=!!(ul&&ul.indexOf("Android")>=0),Oi={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var lt;(function(o){function e(v){return v&&typeof v=="object"&&typeof v[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function n(){return t}o.empty=n;function*i(v){yield v}o.single=i;function r(v){return e(v)?v:i(v)}o.wrap=r;function s(v){return v||t}o.from=s;function*a(v){for(let S=v.length-1;S>=0;S--)yield v[S]}o.reverse=a;function l(v){return!v||v[Symbol.iterator]().next().done===!0}o.isEmpty=l;function c(v){return v[Symbol.iterator]().next().value}o.first=c;function d(v,S){for(const w of v)if(S(w))return!0;return!1}o.some=d;function u(v,S){for(const w of v)if(S(w))return w}o.find=u;function*h(v,S){for(const w of v)S(w)&&(yield w)}o.filter=h;function*f(v,S){let w=0;for(const E of v)yield S(E,w++)}o.map=f;function*p(...v){for(const S of v)yield*S}o.concat=p;function g(v,S,w){let E=w;for(const x of v)E=S(E,x);return E}o.reduce=g;function*_(v,S,w=v.length){for(S<0&&(S+=v.length),w<0?w+=v.length:w>v.length&&(w=v.length);S<w;S++)yield v[S]}o.slice=_;function y(v,S=Number.POSITIVE_INFINITY){const w=[];if(S===0)return[w,v];const E=v[Symbol.iterator]();for(let x=0;x<S;x++){const k=E.next();if(k.done)return[w,o.empty()];w.push(k.value)}return[w,{[Symbol.iterator](){return E}}]}o.consume=y;async function b(v){const S=[];for await(const w of v)S.push(w);return Promise.resolve(S)}o.asyncToArray=b})(lt||(lt={}));let Wn=class lT{constructor(e){this.element=e,this.next=lT.Undefined,this.prev=lT.Undefined}};Wn.Undefined=new Wn(void 0);class ar{constructor(){this._first=Wn.Undefined,this._last=Wn.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Wn.Undefined}clear(){let e=this._first;for(;e!==Wn.Undefined;){const t=e.next;e.prev=Wn.Undefined,e.next=Wn.Undefined,e=t}this._first=Wn.Undefined,this._last=Wn.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new Wn(e);if(this._first===Wn.Undefined)this._first=n,this._last=n;else if(t){const r=this._last;this._last=n,n.prev=r,r.next=n}else{const r=this._first;this._first=n,n.next=r,r.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==Wn.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Wn.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Wn.Undefined&&e.next!==Wn.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Wn.Undefined&&e.next===Wn.Undefined?(this._first=Wn.Undefined,this._last=Wn.Undefined):e.next===Wn.Undefined?(this._last=this._last.prev,this._last.next=Wn.Undefined):e.prev===Wn.Undefined&&(this._first=this._first.next,this._first.prev=Wn.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Wn.Undefined;)yield e.element,e=e.next}}const vP="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function GH(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of vP)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const LD=GH();function kD(o){let e=LD;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const SP=new ar;SP.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Y_(o,e,t,n,i){if(e=kD(e),i||(i=lt.first(SP)),t.length>i.maxLen){let c=o-i.maxLen/2;return c<0?c=0:n+=c,t=t.substring(c,o+i.maxLen/2),Y_(o,e,t,n,i)}const r=Date.now(),s=o-1-n;let a=-1,l=null;for(let c=1;!(Date.now()-r>=i.timeBudget);c++){const d=s-i.windowSize*c;e.lastIndex=Math.max(0,d);const u=zH(e,t,s,a);if(!u&&l||(l=u,d<=0))break;a=d}if(l){const c={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function zH(o,e,t,n){let i;for(;i=o.exec(e);){const r=i.index||0;if(r<=t&&o.lastIndex>=t)return i;if(n>0&&r>n)return null}return null}const Mc=8;class wP{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class CP{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class nn{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return Rw(e,t)}compute(e,t,n){return n}}class p_{constructor(e,t){this.newValue=e,this.didChange=t}}function Rw(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new p_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const n=Array.isArray(o)&&Array.isArray(e)&&gn(o,e);return new p_(e,!n)}let t=!1;for(const n in e)if(e.hasOwnProperty(n)){const i=Rw(o[n],e[n]);i.didChange&&(o[n]=i.newValue,t=!0)}return new p_(o,t)}class T0{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return Rw(e,t)}validate(e){return this.defaultValue}}class Um{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return Rw(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}}function Se(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class ht extends Um{constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="boolean",i.default=n),super(e,t,n,i)}validate(e){return Se(e,this.defaultValue)}}function Bu(o,e,t,n){if(typeof o>"u")return e;let i=parseInt(o,10);return isNaN(i)?e:(i=Math.max(t,i),i=Math.min(n,i),i|0)}class Rt extends Um{static clampedInt(e,t,n,i){return Bu(e,t,n,i)}constructor(e,t,n,i,r,s=void 0){typeof s<"u"&&(s.type="integer",s.default=n,s.minimum=i,s.maximum=r),super(e,t,n,s),this.minimum=i,this.maximum=r}validate(e){return Rt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function jH(o,e,t,n){if(typeof o>"u")return e;const i=ds.float(o,e);return ds.clamp(i,t,n)}class ds extends Um{static clamp(e,t,n){return e<t?t:e>n?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,i,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=i}validate(e){return this.validationFn(ds.float(e,this.defaultValue))}}class Cr extends Um{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="string",i.default=n),super(e,t,n,i)}validate(e){return Cr.string(e,this.defaultValue)}}function Cn(o,e,t,n){return typeof o!="string"?e:n&&o in n?n[o]:t.indexOf(o)===-1?e:o}class on extends Um{constructor(e,t,n,i,r=void 0){typeof r<"u"&&(r.type="string",r.enum=i,r.default=n),super(e,t,n,r),this._allowedValues=i}validate(e){return Cn(e,this.defaultValue,this._allowedValues)}}class wy extends nn{constructor(e,t,n,i,r,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=r,a.default=i),super(e,t,n,a),this._allowedValues=r,this._convert=s}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function KH(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class qH extends nn{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","Optimize for usage with a Screen Reader."),m("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:m("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}}class $H extends nn{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Se(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Se(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function JH(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var gi;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(gi||(gi={}));function XH(o){switch(o){case"line":return gi.Line;case"block":return gi.Block;case"underline":return gi.Underline;case"line-thin":return gi.LineThin;case"block-outline":return gi.BlockOutline;case"underline-thin":return gi.UnderlineThin}}class YH extends T0{constructor(){super(140)}compute(e,t,n){const i=["monaco-editor"];return t.get(39)&&i.push(t.get(39)),e.extraEditorClassName&&i.push(e.extraEditorClassName),t.get(73)==="default"?i.push("mouse-default"):t.get(73)==="copy"&&i.push("mouse-copy"),t.get(110)&&i.push("showUnused"),t.get(138)&&i.push("showDeprecated"),i.join(" ")}}class QH extends ht{constructor(){super(37,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}class ZH extends nn{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:at},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Se(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Cn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Cn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Se(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Se(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Se(t.loop,this.defaultValue.loop)}}}class uo extends nn{constructor(){super(51,"fontLigatures",uo.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?uo.OFF:e==="true"?uo.ON:e:e?uo.ON:uo.OFF}}uo.OFF='"liga" off, "calt" off';uo.ON='"liga" on, "calt" on';class js extends nn{constructor(){super(54,"fontVariations",js.OFF,{anyOf:[{type:"boolean",description:m("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:m("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:m("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?js.OFF:e==="true"?js.TRANSLATE:e:e?js.TRANSLATE:js.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}}js.OFF="normal";js.TRANSLATE="translate";class eG extends T0{constructor(){super(50)}compute(e,t,n){return e.fontInfo}}class tG extends Um{constructor(){super(52,"fontSize",kr.fontSize,{type:"number",minimum:6,maximum:100,default:kr.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){const t=ds.float(e,this.defaultValue);return t===0?kr.fontSize:ds.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}class Ba extends nn{constructor(){super(53,"fontWeight",kr.fontWeight,{anyOf:[{type:"number",minimum:Ba.MINIMUM_VALUE,maximum:Ba.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Ba.SUGGESTION_VALUES}],default:kr.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Rt.clampedInt(e,kr.fontWeight,Ba.MINIMUM_VALUE,Ba.MAXIMUM_VALUE))}}Ba.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Ba.MINIMUM_VALUE=1;Ba.MAXIMUM_VALUE=1e3;class nG extends nn{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),m("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:m("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:m("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:m("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:m("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:m("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:m("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,i,r,s;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Cn(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Cn(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=a.multipleTypeDefinitions)!==null&&n!==void 0?n:Cn(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(i=a.multipleDeclarations)!==null&&i!==void 0?i:Cn(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(r=a.multipleImplementations)!==null&&r!==void 0?r:Cn(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(s=a.multipleReferences)!==null&&s!==void 0?s:Cn(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Cr.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Cr.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Cr.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Cr.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Cr.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class iG extends nn{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:m("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:m("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),delay:Rt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Se(t.sticky,this.defaultValue.sticky),hidingDelay:Rt.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Se(t.above,this.defaultValue.above)}}}class wp extends T0{constructor(){super(143)}compute(e,t,n){return wp.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight);let i=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(i=Math.max(i,t-1));const r=(n+e.viewLineCount+i)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:i,desiredRatio:r,minimapLineCount:s}}static _computeMinimapLayout(e,t){const n=e.outerWidth,i=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};const s=t.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,p=e.minimap.size,g=e.minimap.side,_=e.verticalScrollbarWidth,y=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,S=u?2:3;let w=Math.floor(r*i);const E=w/r;let x=!1,k=!1,D=S*h,B=h/r,O=1;if(p==="fill"||p==="fit"){const{typicalViewportLineCount:Ie,extraLinesBeforeFirstLine:me,extraLinesBeyondLastLine:Ge,desiredRatio:Ve,minimapLineCount:Ee}=wp.computeContainedMinimapLineCount({viewLineCount:y,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:i,lineHeight:l,pixelRatio:r});if(y/Ee>1)x=!0,k=!0,h=1,D=1,B=h/r;else{let Ln=!1,Qi=h+1;if(p==="fit"){const zn=Math.ceil((me+y+Ge)*D);v&&a&&b<=t.stableFitRemainingWidth?(Ln=!0,Qi=t.stableFitMaxMinimapScale):Ln=zn>w}if(p==="fill"||Ln){x=!0;const zn=h;D=Math.min(l*r,Math.max(1,Math.floor(1/Ve))),v&&a&&b<=t.stableFitRemainingWidth&&(Qi=t.stableFitMaxMinimapScale),h=Math.min(Qi,Math.max(1,Math.floor(D/S))),h>zn&&(O=Math.min(2,h/zn)),B=h/r/O,w=Math.ceil(Math.max(Ie,me+y+Ge)*D),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const M=Math.floor(f*B),V=Math.min(M,Math.max(0,Math.floor((b-_-2)*B/(c+B)))+Mc);let $=Math.floor(r*V);const Q=$/r;$=Math.floor($*O);const ge=u?1:2,we=g==="left"?0:n-V-_;return{renderMinimap:ge,minimapLeft:we,minimapWidth:V,minimapHeightIsEditorHeight:x,minimapIsSampling:k,minimapScale:h,minimapLineHeight:D,minimapCanvasInnerWidth:$,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:Q,minimapCanvasOuterHeight:E}}static computeLayout(e,t){const n=t.outerWidth|0,i=t.outerHeight|0,r=t.lineHeight|0,s=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,u=e.get(135),h=u==="inherit"?e.get(134):u,f=h==="inherit"?e.get(130):h,p=e.get(133),g=t.isDominatedByLongLines,_=e.get(57),y=e.get(67).renderType!==0,b=e.get(68),v=e.get(104),S=e.get(83),w=e.get(72),E=e.get(102),x=E.verticalScrollbarSize,k=E.verticalHasArrows,D=E.arrowSize,B=E.horizontalScrollbarSize,O=e.get(43),M=e.get(109)!=="never";let V=e.get(65);O&&M&&(V+=16);let $=0;if(y){const $n=Math.max(s,b);$=Math.round($n*l)}let Q=0;_&&(Q=r*t.glyphMarginDecorationLaneCount);let ge=0,we=ge+Q,Ie=we+$,me=Ie+V;const Ge=n-Q-$-V;let Ve=!1,Ee=!1,he=-1;h==="inherit"&&g?(Ve=!0,Ee=!0):f==="on"||f==="bounded"?Ee=!0:f==="wordWrapColumn"&&(he=p);const Ln=wp._computeMinimapLayout({outerWidth:n,outerHeight:i,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:v,paddingTop:S.top,paddingBottom:S.bottom,minimap:w,verticalScrollbarWidth:x,viewLineCount:d,remainingWidth:Ge,isViewportWrapping:Ee},t.memory||new CP);Ln.renderMinimap!==0&&Ln.minimapLeft===0&&(ge+=Ln.minimapWidth,we+=Ln.minimapWidth,Ie+=Ln.minimapWidth,me+=Ln.minimapWidth);const Qi=Ge-Ln.minimapWidth,zn=Math.max(1,Math.floor((Qi-x-2)/a)),wt=k?D:0;return Ee&&(he=Math.max(1,zn),f==="bounded"&&(he=Math.min(he,p))),{width:n,height:i,glyphMarginLeft:ge,glyphMarginWidth:Q,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:we,lineNumbersWidth:$,decorationsLeft:Ie,decorationsWidth:V,contentLeft:me,contentWidth:Qi,minimap:Ln,viewportColumn:zn,isWordWrapMinified:Ve,isViewportWrapping:Ee,wrappingColumn:he,verticalScrollbarWidth:x,horizontalScrollbarHeight:B,overviewRuler:{top:wt,width:x,height:i-2*wt,right:0}}}}class rG extends nn{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:m("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Cn(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}}var as;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(as||(as={}));class oG extends nn{constructor(){const e={enabled:as.OnCode};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[as.Off,as.OnCode,as.On],default:e.enabled,enumDescriptions:[m("editor.lightbulb.enabled.off","Disable the code action menu."),m("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),m("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:m("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Cn(e.enabled,this.defaultValue.enabled,[as.Off,as.OnCode,as.On])}}}class sG extends nn{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:m("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:m("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:m("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:m("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),maxLineCount:Rt.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Cn(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Se(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class aG extends nn{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m("editor.inlayHints.on","Inlay hints are enabled"),m("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:m("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Cn(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Rt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Cr.string(t.fontFamily,this.defaultValue.fontFamily),padding:Se(t.padding,this.defaultValue.padding)}}}class lG extends nn{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Rt.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Rt.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}}class cG extends ds{constructor(){super(66,"lineHeight",kr.lineHeight,e=>ds.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height.
|
|
3
3
|
- Use 0 to automatically compute the line height from the font size.
|
|
4
4
|
- Values between 0 and 8 will be used as a multiplier with the font size.
|
|
5
5
|
- Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,n){return e.fontInfo.lineHeight}}class dG extends nn{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:m("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:m("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[m("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),m("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),m("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:m("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:m("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:m("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:m("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:m("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:m("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),autohide:Se(t.autohide,this.defaultValue.autohide),size:Cn(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Cn(t.side,this.defaultValue.side,["right","left"]),showSlider:Cn(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Se(t.renderCharacters,this.defaultValue.renderCharacters),scale:Rt.clampedInt(t.scale,1,1,3),maxColumn:Rt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function uG(o){return o==="ctrlCmd"?at?"metaKey":"ctrlKey":"altKey"}class hG extends nn{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Rt.clampedInt(t.top,0,0,1e3),bottom:Rt.clampedInt(t.bottom,0,0,1e3)}}}class fG extends nn{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:m("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:m("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),cycle:Se(t.cycle,this.defaultValue.cycle)}}}class pG extends T0{constructor(){super(141)}compute(e,t,n){return e.pixelRatio}}class mG extends nn{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[m("on","Quick suggestions show inside the suggest widget"),m("inline","Quick suggestions show as ghost text"),m("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:m("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:m("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:m("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:m("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const c=e?"on":"off";return{comments:c,strings:c,other:c}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:n,strings:i}=e,r=["on","inline","off"];let s,a,l;return typeof t=="boolean"?s=t?"on":"off":s=Cn(t,this.defaultValue.other,r),typeof n=="boolean"?a=n?"on":"off":a=Cn(n,this.defaultValue.comments,r),typeof i=="boolean"?l=i?"on":"off":l=Cn(i,this.defaultValue.strings,r),{other:s,comments:a,strings:l}}}class gG extends nn{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[m("lineNumbers.off","Line numbers are not rendered."),m("lineNumbers.on","Line numbers are rendered as absolute number."),m("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),m("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:m("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,n=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:n}}}function Iv(o){const e=o.get(97);return e==="editable"?o.get(90):e!=="on"}class _G extends nn{constructor(){const e=[],t={type:"number",description:m("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:m("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:m("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="number")t.push({column:Rt.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){const i=n;t.push({column:Rt.clampedInt(i.column,0,0,1e4),color:i.color})}return t.sort((n,i)=>n.column-i.column),t}return this.defaultValue}}class yG extends nn{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function aM(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}let bG=class extends nn{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),m("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),m("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),m("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),m("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:m("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:m("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:m("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:m("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,n=Rt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=Rt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Rt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:aM(t.vertical,this.defaultValue.vertical),horizontal:aM(t.horizontal,this.defaultValue.horizontal),useShadows:Se(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Se(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Se(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Se(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Se(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Rt.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:i,verticalSliderSize:Rt.clampedInt(t.verticalSliderSize,i,0,1e3),scrollByPage:Se(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:Se(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}};const io="inUntrustedWorkspace",Er={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class vG extends nn{constructor(){const e={nonBasicASCII:io,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:io,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[Er.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,io],default:e.nonBasicASCII,description:m("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[Er.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:m("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Er.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:m("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Er.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,io],default:e.includeComments,description:m("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Er.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,io],default:e.includeStrings,description:m("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Er.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:m("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Er.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:m("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&e&&(yo(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},n=!0)),t.allowedLocales&&e&&(yo(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},n=!0));const i=super.applyUpdate(e,t);return n?new p_(i.newValue,!0):i}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:Cp(t.nonBasicASCII,io,[!0,!1,io]),invisibleCharacters:Se(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Se(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Cp(t.includeComments,io,[!0,!1,io]),includeStrings:Cp(t.includeStrings,io,[!0,!1,io]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const n={};for(const[i,r]of Object.entries(e))r===!0&&(n[i]=!0);return n}}class SG extends nn{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:m("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[m("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),m("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),m("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:m("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:m("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:m("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),mode:Cn(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Cn(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:Se(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Se(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:Cr.string(t.fontFamily,this.defaultValue.fontFamily)}}}class wG extends nn{constructor(){const e={enabled:Oi.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:Oi.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:m("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:m("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Se(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class CG extends nn{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[m("editor.guides.bracketPairs.true","Enables bracket pair guides."),m("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),m("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:m("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[m("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),m("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),m("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:m("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:m("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:m("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[m("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),m("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),m("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:m("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:Cp(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Cp(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Se(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Se(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Cp(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Cp(o,e,t){const n=t.indexOf(o);return n===-1?e:t[n]}class EG extends nn{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[m("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),m("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:m("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:m("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:m("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:m("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[m("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),m("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),m("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),m("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:m("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:m("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:m("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:m("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:m("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:m("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:m("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:m("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Cn(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Se(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Se(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Se(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Se(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Cn(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Se(t.showIcons,this.defaultValue.showIcons),showStatusBar:Se(t.showStatusBar,this.defaultValue.showStatusBar),preview:Se(t.preview,this.defaultValue.preview),previewMode:Cn(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Se(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Se(t.showMethods,this.defaultValue.showMethods),showFunctions:Se(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Se(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Se(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Se(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Se(t.showFields,this.defaultValue.showFields),showVariables:Se(t.showVariables,this.defaultValue.showVariables),showClasses:Se(t.showClasses,this.defaultValue.showClasses),showStructs:Se(t.showStructs,this.defaultValue.showStructs),showInterfaces:Se(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Se(t.showModules,this.defaultValue.showModules),showProperties:Se(t.showProperties,this.defaultValue.showProperties),showEvents:Se(t.showEvents,this.defaultValue.showEvents),showOperators:Se(t.showOperators,this.defaultValue.showOperators),showUnits:Se(t.showUnits,this.defaultValue.showUnits),showValues:Se(t.showValues,this.defaultValue.showValues),showConstants:Se(t.showConstants,this.defaultValue.showConstants),showEnums:Se(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Se(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Se(t.showKeywords,this.defaultValue.showKeywords),showWords:Se(t.showWords,this.defaultValue.showWords),showColors:Se(t.showColors,this.defaultValue.showColors),showFiles:Se(t.showFiles,this.defaultValue.showFiles),showReferences:Se(t.showReferences,this.defaultValue.showReferences),showFolders:Se(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Se(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Se(t.showSnippets,this.defaultValue.showSnippets),showUsers:Se(t.showUsers,this.defaultValue.showUsers),showIssues:Se(t.showIssues,this.defaultValue.showIssues)}}}class xG extends nn{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:m("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:m("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Se(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Se(e.selectSubwords,this.defaultValue.selectSubwords)}}}class TG extends nn{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[m("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),m("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),m("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),m("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:m("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,n){return t.get(2)===2?0:n}}class LG extends T0{constructor(){super(144)}compute(e,t,n){const i=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:i.isWordWrapMinified,isViewportWrapping:i.isViewportWrapping,wrappingColumn:i.wrappingColumn}}}class kG extends nn{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:m("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:m("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[m("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),m("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),showDropSelector:Cn(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class AG extends nn{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:m("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:m("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[m("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),m("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),showPasteSelector:Cn(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const IG="Consolas, 'Courier New', monospace",DG="Menlo, Monaco, 'Courier New', monospace",NG="'Droid Sans Mono', 'monospace', monospace",kr={fontFamily:at?DG:hr?NG:IG,fontWeight:"normal",fontSize:at?12:14,lineHeight:0,letterSpacing:0},Zf=[];function ne(o){return Zf[o.id]=o,o}const ha={acceptSuggestionOnCommitCharacter:ne(new ht(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:m("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:ne(new on(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",m("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:m("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:ne(new qH),accessibilityPageSize:ne(new Rt(3,"accessibilityPageSize",10,1,1073741824,{description:m("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:ne(new Cr(4,"ariaLabel",m("editorViewAccessibleLabel","Editor content"))),ariaRequired:ne(new ht(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:ne(new ht(8,"screenReaderAnnounceInlineSuggestion",!0,{description:m("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:ne(new on(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),m("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:m("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:ne(new on(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),m("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:m("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:ne(new on(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:ne(new on(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:ne(new on(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),m("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:m("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:ne(new wy(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],KH,{enumDescriptions:[m("editor.autoIndent.none","The editor will not insert indentation automatically."),m("editor.autoIndent.keep","The editor will keep the current line's indentation."),m("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),m("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),m("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:m("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:ne(new ht(13,"automaticLayout",!1)),autoSurround:ne(new on(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[m("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),m("editor.autoSurround.quotes","Surround with quotes but not brackets."),m("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:m("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:ne(new wG),bracketPairGuides:ne(new CG),stickyTabStops:ne(new ht(115,"stickyTabStops",!1,{description:m("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:ne(new ht(17,"codeLens",!0,{description:m("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:ne(new Cr(18,"codeLensFontFamily","",{description:m("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:ne(new Rt(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:m("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:ne(new ht(20,"colorDecorators",!0,{description:m("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:ne(new on(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[m("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),m("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),m("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:m("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:ne(new Rt(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:m("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:ne(new ht(22,"columnSelection",!1,{description:m("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:ne(new $H),contextmenu:ne(new ht(24,"contextmenu",!0)),copyWithSyntaxHighlighting:ne(new ht(25,"copyWithSyntaxHighlighting",!0,{description:m("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:ne(new wy(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],JH,{description:m("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:ne(new on(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[m("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),m("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),m("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:m("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:ne(new wy(28,"cursorStyle",gi.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],XH,{description:m("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:ne(new Rt(29,"cursorSurroundingLines",0,0,1073741824,{description:m("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:ne(new on(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[m("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),m("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:m("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:ne(new Rt(31,"cursorWidth",0,0,1073741824,{markdownDescription:m("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:ne(new ht(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:ne(new ht(33,"disableMonospaceOptimizations",!1)),domReadOnly:ne(new ht(34,"domReadOnly",!1)),dragAndDrop:ne(new ht(35,"dragAndDrop",!0,{description:m("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:ne(new QH),dropIntoEditor:ne(new kG),stickyScroll:ne(new sG),experimentalWhitespaceRendering:ne(new on(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[m("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),m("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),m("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:m("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:ne(new Cr(39,"extraEditorClassName","")),fastScrollSensitivity:ne(new ds(40,"fastScrollSensitivity",5,o=>o<=0?5:o,{markdownDescription:m("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:ne(new ZH),fixedOverflowWidgets:ne(new ht(42,"fixedOverflowWidgets",!1)),folding:ne(new ht(43,"folding",!0,{description:m("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:ne(new on(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[m("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),m("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:m("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:ne(new ht(45,"foldingHighlight",!0,{description:m("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:ne(new ht(46,"foldingImportsByDefault",!1,{description:m("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:ne(new Rt(47,"foldingMaximumRegions",5e3,10,65e3,{description:m("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:ne(new ht(48,"unfoldOnClickAfterEndOfLine",!1,{description:m("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:ne(new Cr(49,"fontFamily",kr.fontFamily,{description:m("fontFamily","Controls the font family.")})),fontInfo:ne(new eG),fontLigatures2:ne(new uo),fontSize:ne(new tG),fontWeight:ne(new Ba),fontVariations:ne(new js),formatOnPaste:ne(new ht(55,"formatOnPaste",!1,{description:m("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:ne(new ht(56,"formatOnType",!1,{description:m("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:ne(new ht(57,"glyphMargin",!0,{description:m("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:ne(new nG),hideCursorInOverviewRuler:ne(new ht(59,"hideCursorInOverviewRuler",!1,{description:m("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:ne(new iG),inDiffEditor:ne(new ht(61,"inDiffEditor",!1)),letterSpacing:ne(new ds(63,"letterSpacing",kr.letterSpacing,o=>ds.clamp(o,-5,20),{description:m("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:ne(new oG),lineDecorationsWidth:ne(new lG),lineHeight:ne(new cG),lineNumbers:ne(new gG),lineNumbersMinChars:ne(new Rt(68,"lineNumbersMinChars",5,1,300)),linkedEditing:ne(new ht(69,"linkedEditing",!1,{description:m("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:ne(new ht(70,"links",!0,{description:m("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:ne(new on(71,"matchBrackets","always",["always","near","never"],{description:m("matchBrackets","Highlight matching brackets.")})),minimap:ne(new dG),mouseStyle:ne(new on(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:ne(new ds(74,"mouseWheelScrollSensitivity",1,o=>o===0?1:o,{markdownDescription:m("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:ne(new ht(75,"mouseWheelZoom",!1,{markdownDescription:at?m("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):m("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:ne(new ht(76,"multiCursorMergeOverlapping",!0,{description:m("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:ne(new wy(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],uG,{markdownEnumDescriptions:[m("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:m({},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:ne(new on(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[m("multiCursorPaste.spread","Each cursor pastes a single line of the text."),m("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:m("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:ne(new Rt(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:m("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:ne(new on(80,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[m("occurrencesHighlight.off","Does not highlight occurrences."),m("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),m("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:m("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:ne(new ht(81,"overviewRulerBorder",!0,{description:m("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:ne(new Rt(82,"overviewRulerLanes",3,0,3)),padding:ne(new hG),pasteAs:ne(new AG),parameterHints:ne(new fG),peekWidgetDefaultFocus:ne(new on(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[m("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),m("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:m("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:ne(new ht(87,"definitionLinkOpensInPeek",!1,{description:m("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:ne(new mG),quickSuggestionsDelay:ne(new Rt(89,"quickSuggestionsDelay",10,0,1073741824,{description:m("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:ne(new ht(90,"readOnly",!1)),readOnlyMessage:ne(new yG),renameOnType:ne(new ht(92,"renameOnType",!1,{description:m("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:m("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:ne(new ht(93,"renderControlCharacters",!0,{description:m("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:ne(new on(94,"renderFinalNewline",hr?"dimmed":"on",["off","on","dimmed"],{description:m("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:ne(new on(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",m("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:m("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:ne(new ht(96,"renderLineHighlightOnlyWhenFocus",!1,{description:m("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:ne(new on(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:ne(new on(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",m("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),m("renderWhitespace.selection","Render whitespace characters only on selected text."),m("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:m("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:ne(new Rt(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:ne(new ht(100,"roundedSelection",!0,{description:m("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:ne(new _G),scrollbar:ne(new bG),scrollBeyondLastColumn:ne(new Rt(103,"scrollBeyondLastColumn",4,0,1073741824,{description:m("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:ne(new ht(104,"scrollBeyondLastLine",!0,{description:m("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:ne(new ht(105,"scrollPredominantAxis",!0,{description:m("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:ne(new ht(106,"selectionClipboard",!0,{description:m("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:hr})),selectionHighlight:ne(new ht(107,"selectionHighlight",!0,{description:m("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:ne(new ht(108,"selectOnLineNumbers",!0)),showFoldingControls:ne(new on(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[m("showFoldingControls.always","Always show the folding controls."),m("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),m("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:m("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:ne(new ht(110,"showUnused",!0,{description:m("showUnused","Controls fading out of unused code.")})),showDeprecated:ne(new ht(138,"showDeprecated",!0,{description:m("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:ne(new aG),snippetSuggestions:ne(new on(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[m("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),m("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),m("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),m("snippetSuggestions.none","Do not show snippet suggestions.")],description:m("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:ne(new xG),smoothScrolling:ne(new ht(113,"smoothScrolling",!1,{description:m("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:ne(new Rt(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:ne(new EG),inlineSuggest:ne(new SG),inlineCompletionsAccessibilityVerbose:ne(new ht(147,"inlineCompletionsAccessibilityVerbose",!1,{description:m("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:ne(new Rt(118,"suggestFontSize",0,0,1e3,{markdownDescription:m("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:ne(new Rt(119,"suggestLineHeight",0,0,1e3,{markdownDescription:m("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:ne(new ht(120,"suggestOnTriggerCharacters",!0,{description:m("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:ne(new on(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[m("suggestSelection.first","Always select the first suggestion."),m("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),m("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:m("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:ne(new on(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[m("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),m("tabCompletion.off","Disable tab completions."),m("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:m("tabCompletion","Enables tab completions.")})),tabIndex:ne(new Rt(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:ne(new vG),unusualLineTerminators:ne(new on(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),m("unusualLineTerminators.off","Unusual line terminators are ignored."),m("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:m("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:ne(new ht(126,"useShadowDOM",!0)),useTabStops:ne(new ht(127,"useTabStops",!0,{description:m("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:ne(new on(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[m("wordBreak.normal","Use the default line break rule."),m("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:m("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:ne(new Cr(129,"wordSeparators",vP,{description:m("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:ne(new on(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m({},"Lines will wrap at `#editor.wordWrapColumn#`."),m({},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:m({},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:ne(new Cr(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:ne(new Cr(132,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:ne(new Rt(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:m({},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:ne(new on(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ne(new on(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:ne(new YH),defaultColorDecorators:ne(new ht(145,"defaultColorDecorators",!1,{markdownDescription:m("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:ne(new pG),tabFocusMode:ne(new ht(142,"tabFocusMode",!1,{markdownDescription:m("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:ne(new wp),wrappingInfo:ne(new LG),wrappingIndent:ne(new TG),wrappingStrategy:ne(new rG)};class RG{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Xp.isErrorNoTelemetry(e)?new Xp(e.message+`
|
|
@@ -651,22 +651,22 @@ ${e.toString()}`}}class JS{constructor(e=new G0,t=!1,n,i=jae){var r;this._servic
|
|
|
651
651
|
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
|
652
652
|
* Released under the MIT license
|
|
653
653
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
654
|
-
*-----------------------------------------------------------------------------*/var lue=Object.defineProperty,cue=Object.getOwnPropertyDescriptor,due=Object.getOwnPropertyNames,uue=Object.prototype.hasOwnProperty,hue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of due(e))!uue.call(o,i)&&i!==t&&lue(o,i,{get:()=>e[i],enumerable:!(n=cue(e,i))||n.enumerable});return o},fue=(o,e,t)=>(hue(o,e,"default"),t),o_={};fue(o_,YC);var dV={},k2={},pue=class uV{static getOrCreate(e){return k2[e]||(k2[e]=new uV(e)),k2[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,n)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,dV[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function Ce(o){const e=o.id;dV[e]=o,o_.languages.register(o);const t=pue.getOrCreate(e);o_.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),o_.languages.onLanguageEncountered(e,async()=>{const n=await t.load();o_.languages.setLanguageConfiguration(e,n.conf)})}Ce({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>ye(()=>import("./abap-B-ZgRVsS.js"),[])});Ce({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>ye(()=>import("./apex-pqFeVHah.js"),[])});Ce({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>ye(()=>import("./azcli-DrGgKfrx.js"),[])});Ce({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>ye(()=>import("./bat-BRahd1m2.js"),[])});Ce({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>ye(()=>import("./bicep-Br5yCzQa.js"),[])});Ce({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>ye(()=>import("./cameligo-BPiAgOve.js"),[])});Ce({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>ye(()=>import("./clojure-CpX5XwJp.js"),[])});Ce({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>ye(()=>import("./coffee-DPYBl3Sw.js"),[])});Ce({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>ye(()=>import("./cpp-A-JA5b_j.js"),[])});Ce({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>ye(()=>import("./cpp-A-JA5b_j.js"),[])});Ce({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>ye(()=>import("./csharp-CwCtWZg4.js"),[])});Ce({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>ye(()=>import("./csp-DKfky23r.js"),[])});Ce({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>ye(()=>import("./css-C0oCs38a.js"),[])});Ce({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>ye(()=>import("./cypher-BHNfvd4C.js"),[])});Ce({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>ye(()=>import("./dart-BLNd8_RN.js"),[])});Ce({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>ye(()=>import("./dockerfile-Bi2t-SDM.js"),[])});Ce({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>ye(()=>import("./ecl-A9rov3bq.js"),[])});Ce({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>ye(()=>import("./elixir-DJHHJNm9.js"),[])});Ce({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>ye(()=>import("./flow9-BXCop7c-.js"),[])});Ce({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>ye(()=>import("./fsharp-BWYaIR55.js"),[])});Ce({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>ye(()=>import("./freemarker2-z8zA5ezm.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});Ce({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>ye(()=>import("./freemarker2-z8zA5ezm.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationDollar)});Ce({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>ye(()=>import("./freemarker2-z8zA5ezm.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationDollar)});Ce({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>ye(()=>import("./freemarker2-z8zA5ezm.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationBracket)});Ce({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>ye(()=>import("./freemarker2-z8zA5ezm.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationBracket)});Ce({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>ye(()=>import("./freemarker2-z8zA5ezm.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});Ce({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>ye(()=>import("./freemarker2-z8zA5ezm.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationBracket)});Ce({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>ye(()=>import("./go-Bd3rW8Cw.js"),[])});Ce({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>ye(()=>import("./graphql-Dm4lPrOw.js"),[])});Ce({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>ye(()=>import("./handlebars-DTrkysaX.js"),__vite__mapDeps([4,1,2,3]))});Ce({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>ye(()=>import("./hcl-B_GIsMV3.js"),[])});Ce({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>ye(()=>import("./html-BiGIRkmo.js"),__vite__mapDeps([5,1,2,3]))});Ce({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>ye(()=>import("./ini-8BCaSfCG.js"),[])});Ce({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>ye(()=>import("./java-BzOp7UBR.js"),[])});Ce({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>ye(()=>import("./javascript-DEAY-G4N.js"),__vite__mapDeps([6,7,1,2,3]))});Ce({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>ye(()=>import("./julia-I1-aRIRv.js"),[])});Ce({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>ye(()=>import("./kotlin-BggX9fXn.js"),[])});Ce({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>ye(()=>import("./less-ByFiWodf.js"),[])});Ce({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>ye(()=>import("./lexon-B2yfmeoX.js"),[])});Ce({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>ye(()=>import("./lua-CTHhD-fD.js"),[])});Ce({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>ye(()=>import("./liquid-Bt_q9jyv.js"),__vite__mapDeps([8,1,2,3]))});Ce({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>ye(()=>import("./m3-qBOyJ0vE.js"),[])});Ce({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>ye(()=>import("./markdown-Cm28xlel.js"),[])});Ce({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>ye(()=>import("./mdx-BtbMy52t.js"),__vite__mapDeps([9,1,2,3]))});Ce({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>ye(()=>import("./mips-DqiVsLO5.js"),[])});Ce({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>ye(()=>import("./msdax-C3nM-ZR_.js"),[])});Ce({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>ye(()=>import("./mysql-BPWqZDWr.js"),[])});Ce({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>ye(()=>import("./objective-c-afWjKtEP.js"),[])});Ce({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>ye(()=>import("./pascal-DMmvnikK.js"),[])});Ce({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>ye(()=>import("./pascaligo-BaiKb_sq.js"),[])});Ce({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>ye(()=>import("./perl-xMumSrWe.js"),[])});Ce({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>ye(()=>import("./pgsql-C-EgqMcd.js"),[])});Ce({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>ye(()=>import("./php-DkYVXRex.js"),[])});Ce({id:"pla",extensions:[".pla"],loader:()=>ye(()=>import("./pla-CG9rR3U0.js"),[])});Ce({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>ye(()=>import("./postiats-BCC2sChj.js"),[])});Ce({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>ye(()=>import("./powerquery-BhOZIDqB.js"),[])});Ce({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>ye(()=>import("./powershell-wocyr7cA.js"),[])});Ce({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>ye(()=>import("./protobuf-DU3uZwW0.js"),[])});Ce({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>ye(()=>import("./pug-Bqn_XUqj.js"),[])});Ce({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>ye(()=>import("./python-DIVYbK-C.js"),__vite__mapDeps([10,1,2,3]))});Ce({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>ye(()=>import("./qsharp-Cj1jue1V.js"),[])});Ce({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>ye(()=>import("./r-CIZIOQYl.js"),[])});Ce({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>ye(()=>import("./razor-ztrk2wBu.js"),__vite__mapDeps([11,1,2,3]))});Ce({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>ye(()=>import("./redis-Brk2d6n9.js"),[])});Ce({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>ye(()=>import("./redshift-BraSvCe6.js"),[])});Ce({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>ye(()=>import("./restructuredtext-Hh-PJCdS.js"),[])});Ce({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>ye(()=>import("./ruby-Cro5SiRh.js"),[])});Ce({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>ye(()=>import("./rust-GtgTsMTz.js"),[])});Ce({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>ye(()=>import("./sb-DrBYdvZl.js"),[])});Ce({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>ye(()=>import("./scala-u8KvBYJ0.js"),[])});Ce({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>ye(()=>import("./scheme-CC8-3vA2.js"),[])});Ce({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>ye(()=>import("./scss-CG62jlW4.js"),[])});Ce({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>ye(()=>import("./shell-CWImXz8u.js"),[])});Ce({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>ye(()=>import("./solidity-DFsCHDMA.js"),[])});Ce({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>ye(()=>import("./sophia-CWBVWc0_.js"),[])});Ce({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>ye(()=>import("./sparql-Ca6jL_8E.js"),[])});Ce({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>ye(()=>import("./sql-C86UFuzS.js"),[])});Ce({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>ye(()=>import("./st-CjrOQGnb.js"),[])});Ce({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>ye(()=>import("./swift-TX6SQEBl.js"),[])});Ce({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>ye(()=>import("./systemverilog-DYRoH6ZJ.js"),[])});Ce({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>ye(()=>import("./systemverilog-DYRoH6ZJ.js"),[])});Ce({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>ye(()=>import("./tcl-DLjrRbxU.js"),[])});Ce({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>ye(()=>import("./twig-CRyFog85.js"),[])});Ce({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>ye(()=>import("./typescript-CHa_3xkF.js"),__vite__mapDeps([7,1,2,3]))});Ce({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>ye(()=>import("./vb-CQSqy7yk.js"),[])});Ce({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>ye(()=>import("./wgsl-DbhGdQ56.js"),[])});Ce({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>ye(()=>import("./xml-B2WXRoPu.js"),__vite__mapDeps([12,1,2,3]))});Ce({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>ye(()=>import("./yaml-6vYkUkh3.js"),__vite__mapDeps([13,1,2,3]))});/*!-----------------------------------------------------------------------------
|
|
654
|
+
*-----------------------------------------------------------------------------*/var lue=Object.defineProperty,cue=Object.getOwnPropertyDescriptor,due=Object.getOwnPropertyNames,uue=Object.prototype.hasOwnProperty,hue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of due(e))!uue.call(o,i)&&i!==t&&lue(o,i,{get:()=>e[i],enumerable:!(n=cue(e,i))||n.enumerable});return o},fue=(o,e,t)=>(hue(o,e,"default"),t),o_={};fue(o_,YC);var dV={},k2={},pue=class uV{static getOrCreate(e){return k2[e]||(k2[e]=new uV(e)),k2[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,n)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,dV[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function Ce(o){const e=o.id;dV[e]=o,o_.languages.register(o);const t=pue.getOrCreate(e);o_.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),o_.languages.onLanguageEncountered(e,async()=>{const n=await t.load();o_.languages.setLanguageConfiguration(e,n.conf)})}Ce({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>ye(()=>import("./abap-B-ZgRVsS.js"),[])});Ce({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>ye(()=>import("./apex-pqFeVHah.js"),[])});Ce({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>ye(()=>import("./azcli-DrGgKfrx.js"),[])});Ce({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>ye(()=>import("./bat-BRahd1m2.js"),[])});Ce({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>ye(()=>import("./bicep-Br5yCzQa.js"),[])});Ce({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>ye(()=>import("./cameligo-BPiAgOve.js"),[])});Ce({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>ye(()=>import("./clojure-CpX5XwJp.js"),[])});Ce({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>ye(()=>import("./coffee-DPYBl3Sw.js"),[])});Ce({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>ye(()=>import("./cpp-A-JA5b_j.js"),[])});Ce({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>ye(()=>import("./cpp-A-JA5b_j.js"),[])});Ce({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>ye(()=>import("./csharp-CwCtWZg4.js"),[])});Ce({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>ye(()=>import("./csp-DKfky23r.js"),[])});Ce({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>ye(()=>import("./css-C0oCs38a.js"),[])});Ce({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>ye(()=>import("./cypher-BHNfvd4C.js"),[])});Ce({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>ye(()=>import("./dart-BLNd8_RN.js"),[])});Ce({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>ye(()=>import("./dockerfile-Bi2t-SDM.js"),[])});Ce({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>ye(()=>import("./ecl-A9rov3bq.js"),[])});Ce({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>ye(()=>import("./elixir-DJHHJNm9.js"),[])});Ce({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>ye(()=>import("./flow9-BXCop7c-.js"),[])});Ce({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>ye(()=>import("./fsharp-BWYaIR55.js"),[])});Ce({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>ye(()=>import("./freemarker2-3NvUG45O.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});Ce({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>ye(()=>import("./freemarker2-3NvUG45O.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationDollar)});Ce({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>ye(()=>import("./freemarker2-3NvUG45O.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationDollar)});Ce({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>ye(()=>import("./freemarker2-3NvUG45O.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationBracket)});Ce({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>ye(()=>import("./freemarker2-3NvUG45O.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationBracket)});Ce({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>ye(()=>import("./freemarker2-3NvUG45O.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});Ce({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>ye(()=>import("./freemarker2-3NvUG45O.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationBracket)});Ce({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>ye(()=>import("./go-Bd3rW8Cw.js"),[])});Ce({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>ye(()=>import("./graphql-Dm4lPrOw.js"),[])});Ce({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>ye(()=>import("./handlebars-CFHZlhgH.js"),__vite__mapDeps([4,1,2,3]))});Ce({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>ye(()=>import("./hcl-B_GIsMV3.js"),[])});Ce({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>ye(()=>import("./html-Bkw9bGL4.js"),__vite__mapDeps([5,1,2,3]))});Ce({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>ye(()=>import("./ini-8BCaSfCG.js"),[])});Ce({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>ye(()=>import("./java-BzOp7UBR.js"),[])});Ce({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>ye(()=>import("./javascript-ByJcXg8C.js"),__vite__mapDeps([6,7,1,2,3]))});Ce({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>ye(()=>import("./julia-I1-aRIRv.js"),[])});Ce({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>ye(()=>import("./kotlin-BggX9fXn.js"),[])});Ce({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>ye(()=>import("./less-ByFiWodf.js"),[])});Ce({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>ye(()=>import("./lexon-B2yfmeoX.js"),[])});Ce({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>ye(()=>import("./lua-CTHhD-fD.js"),[])});Ce({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>ye(()=>import("./liquid-D7tDuX3T.js"),__vite__mapDeps([8,1,2,3]))});Ce({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>ye(()=>import("./m3-qBOyJ0vE.js"),[])});Ce({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>ye(()=>import("./markdown-Cm28xlel.js"),[])});Ce({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>ye(()=>import("./mdx-Ct31jTJm.js"),__vite__mapDeps([9,1,2,3]))});Ce({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>ye(()=>import("./mips-DqiVsLO5.js"),[])});Ce({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>ye(()=>import("./msdax-C3nM-ZR_.js"),[])});Ce({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>ye(()=>import("./mysql-BPWqZDWr.js"),[])});Ce({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>ye(()=>import("./objective-c-afWjKtEP.js"),[])});Ce({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>ye(()=>import("./pascal-DMmvnikK.js"),[])});Ce({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>ye(()=>import("./pascaligo-BaiKb_sq.js"),[])});Ce({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>ye(()=>import("./perl-xMumSrWe.js"),[])});Ce({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>ye(()=>import("./pgsql-C-EgqMcd.js"),[])});Ce({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>ye(()=>import("./php-DkYVXRex.js"),[])});Ce({id:"pla",extensions:[".pla"],loader:()=>ye(()=>import("./pla-CG9rR3U0.js"),[])});Ce({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>ye(()=>import("./postiats-BCC2sChj.js"),[])});Ce({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>ye(()=>import("./powerquery-BhOZIDqB.js"),[])});Ce({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>ye(()=>import("./powershell-wocyr7cA.js"),[])});Ce({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>ye(()=>import("./protobuf-DU3uZwW0.js"),[])});Ce({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>ye(()=>import("./pug-Bqn_XUqj.js"),[])});Ce({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>ye(()=>import("./python-B9O75g1L.js"),__vite__mapDeps([10,1,2,3]))});Ce({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>ye(()=>import("./qsharp-Cj1jue1V.js"),[])});Ce({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>ye(()=>import("./r-CIZIOQYl.js"),[])});Ce({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>ye(()=>import("./razor-CTgHL3xd.js"),__vite__mapDeps([11,1,2,3]))});Ce({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>ye(()=>import("./redis-Brk2d6n9.js"),[])});Ce({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>ye(()=>import("./redshift-BraSvCe6.js"),[])});Ce({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>ye(()=>import("./restructuredtext-Hh-PJCdS.js"),[])});Ce({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>ye(()=>import("./ruby-Cro5SiRh.js"),[])});Ce({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>ye(()=>import("./rust-GtgTsMTz.js"),[])});Ce({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>ye(()=>import("./sb-DrBYdvZl.js"),[])});Ce({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>ye(()=>import("./scala-u8KvBYJ0.js"),[])});Ce({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>ye(()=>import("./scheme-CC8-3vA2.js"),[])});Ce({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>ye(()=>import("./scss-CG62jlW4.js"),[])});Ce({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>ye(()=>import("./shell-CWImXz8u.js"),[])});Ce({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>ye(()=>import("./solidity-DFsCHDMA.js"),[])});Ce({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>ye(()=>import("./sophia-CWBVWc0_.js"),[])});Ce({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>ye(()=>import("./sparql-Ca6jL_8E.js"),[])});Ce({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>ye(()=>import("./sql-C86UFuzS.js"),[])});Ce({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>ye(()=>import("./st-CjrOQGnb.js"),[])});Ce({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>ye(()=>import("./swift-TX6SQEBl.js"),[])});Ce({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>ye(()=>import("./systemverilog-DYRoH6ZJ.js"),[])});Ce({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>ye(()=>import("./systemverilog-DYRoH6ZJ.js"),[])});Ce({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>ye(()=>import("./tcl-DLjrRbxU.js"),[])});Ce({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>ye(()=>import("./twig-CRyFog85.js"),[])});Ce({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>ye(()=>import("./typescript-CjO-D8b6.js"),__vite__mapDeps([7,1,2,3]))});Ce({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>ye(()=>import("./vb-CQSqy7yk.js"),[])});Ce({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>ye(()=>import("./wgsl-DbhGdQ56.js"),[])});Ce({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>ye(()=>import("./xml-D7AJmN-D.js"),__vite__mapDeps([12,1,2,3]))});Ce({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>ye(()=>import("./yaml-Ct88-2x6.js"),__vite__mapDeps([13,1,2,3]))});/*!-----------------------------------------------------------------------------
|
|
655
655
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
656
656
|
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
|
657
657
|
* Released under the MIT license
|
|
658
658
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
659
|
-
*-----------------------------------------------------------------------------*/var mue=Object.defineProperty,gue=Object.getOwnPropertyDescriptor,_ue=Object.getOwnPropertyNames,yue=Object.prototype.hasOwnProperty,bue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _ue(e))!yue.call(o,i)&&i!==t&&mue(o,i,{get:()=>e[i],enumerable:!(n=gue(e,i))||n.enumerable});return o},vue=(o,e,t)=>(bue(o,e,"default"),t),tg={};vue(tg,YC);var e6=class{constructor(e,t,n){this._onDidChange=new tg.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},t6={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},n6={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},hV=new e6("css",t6,n6),fV=new e6("scss",t6,n6),pV=new e6("less",t6,n6);tg.languages.css={cssDefaults:hV,lessDefaults:pV,scssDefaults:fV};function i6(){return ye(()=>import("./cssMode-
|
|
659
|
+
*-----------------------------------------------------------------------------*/var mue=Object.defineProperty,gue=Object.getOwnPropertyDescriptor,_ue=Object.getOwnPropertyNames,yue=Object.prototype.hasOwnProperty,bue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _ue(e))!yue.call(o,i)&&i!==t&&mue(o,i,{get:()=>e[i],enumerable:!(n=gue(e,i))||n.enumerable});return o},vue=(o,e,t)=>(bue(o,e,"default"),t),tg={};vue(tg,YC);var e6=class{constructor(e,t,n){this._onDidChange=new tg.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},t6={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},n6={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},hV=new e6("css",t6,n6),fV=new e6("scss",t6,n6),pV=new e6("less",t6,n6);tg.languages.css={cssDefaults:hV,lessDefaults:pV,scssDefaults:fV};function i6(){return ye(()=>import("./cssMode-BPdPLkVG.js"),__vite__mapDeps([14,1,2,3]))}tg.languages.onLanguage("less",()=>{i6().then(o=>o.setupMode(pV))});tg.languages.onLanguage("scss",()=>{i6().then(o=>o.setupMode(fV))});tg.languages.onLanguage("css",()=>{i6().then(o=>o.setupMode(hV))});/*!-----------------------------------------------------------------------------
|
|
660
660
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
661
661
|
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
|
662
662
|
* Released under the MIT license
|
|
663
663
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
664
|
-
*-----------------------------------------------------------------------------*/var Sue=Object.defineProperty,wue=Object.getOwnPropertyDescriptor,Cue=Object.getOwnPropertyNames,Eue=Object.prototype.hasOwnProperty,xue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Cue(e))!Eue.call(o,i)&&i!==t&&Sue(o,i,{get:()=>e[i],enumerable:!(n=wue(e,i))||n.enumerable});return o},Tue=(o,e,t)=>(xue(o,e,"default"),t),QC={};Tue(QC,YC);var Lue=class{constructor(e,t,n){this._onDidChange=new QC.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},kue={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},ZC={format:kue,suggest:{},data:{useDefaultDataProvider:!0}};function eE(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===F_,documentFormattingEdits:o===F_,documentRangeFormattingEdits:o===F_}}var F_="html",T3="handlebars",L3="razor",mV=tE(F_,ZC,eE(F_)),Aue=mV.defaults,gV=tE(T3,ZC,eE(T3)),Iue=gV.defaults,_V=tE(L3,ZC,eE(L3)),Due=_V.defaults;QC.languages.html={htmlDefaults:Aue,razorDefaults:Due,handlebarDefaults:Iue,htmlLanguageService:mV,handlebarLanguageService:gV,razorLanguageService:_V,registerHTMLLanguageService:tE};function Nue(){return ye(()=>import("./htmlMode-
|
|
664
|
+
*-----------------------------------------------------------------------------*/var Sue=Object.defineProperty,wue=Object.getOwnPropertyDescriptor,Cue=Object.getOwnPropertyNames,Eue=Object.prototype.hasOwnProperty,xue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Cue(e))!Eue.call(o,i)&&i!==t&&Sue(o,i,{get:()=>e[i],enumerable:!(n=wue(e,i))||n.enumerable});return o},Tue=(o,e,t)=>(xue(o,e,"default"),t),QC={};Tue(QC,YC);var Lue=class{constructor(e,t,n){this._onDidChange=new QC.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},kue={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},ZC={format:kue,suggest:{},data:{useDefaultDataProvider:!0}};function eE(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===F_,documentFormattingEdits:o===F_,documentRangeFormattingEdits:o===F_}}var F_="html",T3="handlebars",L3="razor",mV=tE(F_,ZC,eE(F_)),Aue=mV.defaults,gV=tE(T3,ZC,eE(T3)),Iue=gV.defaults,_V=tE(L3,ZC,eE(L3)),Due=_V.defaults;QC.languages.html={htmlDefaults:Aue,razorDefaults:Due,handlebarDefaults:Iue,htmlLanguageService:mV,handlebarLanguageService:gV,razorLanguageService:_V,registerHTMLLanguageService:tE};function Nue(){return ye(()=>import("./htmlMode-CRd0eLDO.js"),__vite__mapDeps([15,1,2,3]))}function tE(o,e=ZC,t=eE(o)){const n=new Lue(o,e,t);let i;const r=QC.languages.onLanguage(o,async()=>{i=(await Nue()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),i==null||i.dispose(),i=void 0}}}var Rue=class{constructor(e,t,n){this._onDidChange=new aV,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Mue={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Oue={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},yV=new Rue("json",Mue,Oue),Pue=()=>bV().then(o=>o.getWorker());km.json={jsonDefaults:yV,getWorker:Pue};function bV(){return ye(()=>import("./jsonMode-eQLqr7ag.js"),__vite__mapDeps([16,1,2,3]))}km.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});km.onLanguage("json",()=>{bV().then(o=>o.setupMode(yV))});/*!-----------------------------------------------------------------------------
|
|
665
665
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
666
666
|
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
|
667
667
|
* Released under the MIT license
|
|
668
668
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
669
|
-
*-----------------------------------------------------------------------------*/var Fue=Object.defineProperty,Bue=Object.getOwnPropertyDescriptor,Vue=Object.getOwnPropertyNames,Wue=Object.prototype.hasOwnProperty,Uue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Vue(e))!Wue.call(o,i)&&i!==t&&Fue(o,i,{get:()=>e[i],enumerable:!(n=Bue(e,i))||n.enumerable});return o},Hue=(o,e,t)=>(Uue(o,e,"default"),t),Gue="5.0.2",Am={};Hue(Am,YC);var vV=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(vV||{}),SV=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(SV||{}),wV=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(wV||{}),CV=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(CV||{}),EV=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(EV||{}),xV=class{constructor(o,e,t,n,i){this._onDidChange=new Am.Emitter,this._onDidExtraLibsChange=new Am.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},zue=Gue,TV={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},LV=new xV({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},TV),kV=new xV({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},TV),jue=()=>nE().then(o=>o.getTypeScriptWorker()),Kue=()=>nE().then(o=>o.getJavaScriptWorker());Am.languages.typescript={ModuleKind:vV,JsxEmit:SV,NewLineKind:wV,ScriptTarget:CV,ModuleResolutionKind:EV,typescriptVersion:zue,typescriptDefaults:LV,javascriptDefaults:kV,getTypeScriptWorker:jue,getJavaScriptWorker:Kue};function nE(){return ye(()=>import("./tsMode-Fc-Kxr3a.js"),__vite__mapDeps([17,1,2,3]))}Am.languages.onLanguage("typescript",()=>nE().then(o=>o.setupTypeScript(LV)));Am.languages.onLanguage("javascript",()=>nE().then(o=>o.setupJavaScript(kV)));class que extends To{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Br("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:se.map,toggled:J.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:J.has("isInDiffEditor"),menu:{when:J.has("isInDiffEditor"),id:L.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const n=e.get(rt),i=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}}Jt(que);class AV extends To{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Br("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:J.has("isInDiffEditor")})}run(e,...t){const n=e.get(rt),i=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",i)}}Jt(AV);class IV extends To{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Br("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:J.has("isInDiffEditor")})}run(e,...t){const n=e.get(rt),i=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}}Jt(IV);yi.appendMenuItem(L.EditorTitle,{command:{id:new IV().desc.id,title:m("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:J.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:J.has("isInDiffEditor")},order:11,group:"1_diff",when:J.and(A.diffEditorRenderSideBySideInlineBreakpointReached,J.has("isInDiffEditor"))});yi.appendMenuItem(L.EditorTitle,{command:{id:new AV().desc.id,title:m("showMoves","Show Moved Code Blocks"),icon:se.move,toggled:Gm.create("config.diffEditor.experimental.showMoves",!0),precondition:J.has("isInDiffEditor")},order:10,group:"1_diff",when:J.has("isInDiffEditor")});const iE={value:m("diffEditor","Diff Editor"),original:"Diff Editor"};class $ue extends ma{constructor(){super({id:"diffEditor.switchSide",title:Br("switchSide","Switch Side"),icon:se.arrowSwap,precondition:J.has("isInDiffEditor"),f1:!0,category:iE})}runEditorCommand(e,t,n){const i=ig(e);if(i instanceof qd){if(n&&n.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}}Jt($ue);class Jue extends ma{constructor(){super({id:"diffEditor.exitCompareMove",title:Br("exitCompareMove","Exit Compare Move"),icon:se.close,precondition:A.comparingMovedCode,f1:!1,category:iE,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){const i=ig(e);i instanceof qd&&i.exitCompareMove()}}Jt(Jue);class Xue extends ma{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Br("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:se.fold,precondition:J.has("isInDiffEditor"),f1:!0,category:iE})}runEditorCommand(e,t,...n){const i=ig(e);i instanceof qd&&i.collapseAllUnchangedRegions()}}Jt(Xue);class Yue extends ma{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Br("showAllUnchangedRegions","Show All Unchanged Regions"),icon:se.unfold,precondition:J.has("isInDiffEditor"),f1:!0,category:iE})}runEditorCommand(e,t,...n){const i=ig(e);i instanceof qd&&i.showAllUnchangedRegions()}}Jt(Yue);const DV={value:m("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class ng extends To{constructor(){super({id:ng.id,title:Br("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:DV,precondition:J.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=ig(e);t==null||t.accessibleDiffViewerNext()}}ng.id="editor.action.accessibleDiffViewer.next";yi.appendMenuItem(L.EditorTitle,{command:{id:ng.id,title:m("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:J.has("isInDiffEditor")},order:10,group:"2_diff",when:J.and(A.accessibleDiffViewerVisible.negate(),J.has("isInDiffEditor"))});class ry extends To{constructor(){super({id:ry.id,title:Br("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:DV,precondition:J.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=ig(e);t==null||t.accessibleDiffViewerPrev()}}ry.id="editor.action.accessibleDiffViewer.prev";function ig(o){const t=o.get(gt).listDiffEditors(),n=Ai();if(n)for(const i of t){const r=i.getContainerDomNode();if(Que(r,n))return i}return null}function Que(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}ct.registerCommandAlias("editor.action.diffReview.next",ng.id);Jt(ng);ct.registerCommandAlias("editor.action.diffReview.prev",ry.id);Jt(ry);var Zue=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ehe=function(o,e){return function(t,n){e(t,n,o)}},PA;const rE=new ce("selectionAnchorSet",!1);let bc=PA=class{static get(e){return e.getContribution(PA.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=rE.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(_e.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Pi().appendText(m("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),$r(m("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(_e.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};bc.ID="editor.contrib.selectionAnchorController";bc=PA=Zue([ehe(1,Oe)],bc);class the extends fe{constructor(){super({id:"editor.action.setSelectionAnchor",label:m("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:A.editorTextFocus,primary:Gn(2089,2080),weight:100}})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.setSelectionAnchor()}}class nhe extends fe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:m("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:rE})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.goToSelectionAnchor()}}class ihe extends fe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:m("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:rE,kbOpts:{kbExpr:A.editorTextFocus,primary:Gn(2089,2089),weight:100}})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.selectFromAnchorToCursor()}}class rhe extends fe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:m("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:rE,kbOpts:{kbExpr:A.editorTextFocus,primary:9,weight:100}})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.cancelSelectionAnchor()}}_t(bc.ID,bc,4);te(the);te(nhe);te(ihe);te(rhe);const ohe=I("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},m("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class she extends fe{constructor(){super({id:"editor.action.jumpToBracket",label:m("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:A.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=_s.get(t))===null||n===void 0||n.jumpToBracket()}}class ahe extends fe{constructor(){super({id:"editor.action.selectToBracket",label:m("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Br("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=_s.get(t))===null||i===void 0||i.selectToBracket(r)}}class lhe extends fe{constructor(){super({id:"editor.action.removeBrackets",label:m("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:A.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=_s.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class che{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class _s extends U{static get(e){return e.getContribution(_s.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Dt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let s=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?s=r[1].getStartPosition():r[1].containsPosition(i)&&(s=r[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(i);if(a)s=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(i);l&&l.range&&(s=l.range.getStartPosition())}}return s?new _e(s.lineNumber,s.column,s.lineNumber,s.column):new _e(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let s=t.bracketPairs.matchBracket(r);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(r),!s)){const c=t.bracketPairs.findNextBracket(r);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(T.compareRangesUsingStarts);const[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(r)){const u=a;a=l,l=u}}a&&l&&n.push(new _e(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let s=0;for(let u=0,h=e.length;u<h;u++){const f=e[u];f.isEmpty()&&(r[s++]=f.getStartPosition())}r.length>1&&r.sort(F.compare);const a=[];let l=0,c=0;const d=i.length;for(let u=0,h=r.length;u<h;u++){const f=r[u];for(;c<d&&i[c].position.isBefore(f);)c++;if(c<d&&i[c].position.equals(f))a[l++]=i[c];else{let p=t.bracketPairs.matchBracket(f,20),g=_s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(f,20),g=_s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new che(f,p,g)}}this._lastBracketsData=a,this._lastVersionId=n}}_s.ID="editor.contrib.bracketMatchingController";_s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=He.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ln(ohe),position:wo.Center}});_s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=He.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});_t(_s.ID,_s,1);te(ahe);te(she);te(lhe);yi.appendMenuItem(L.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m({},"Go to &&Bracket")},order:2});class dhe{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const n=this._selection.startLineNumber,i=this._selection.startColumn,r=this._selection.endColumn;if(!(this._isMovingLeft&&i===1)&&!(!this._isMovingLeft&&r===e.getLineMaxColumn(n)))if(this._isMovingLeft){const s=new T(n,i-1,n,i),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new T(n,r,n,r),a)}else{const s=new T(n,r,n,r+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new T(n,i,n,i),a)}}computeCursorState(e,t){return this._isMovingLeft?new _e(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new _e(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class NV extends fe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const n=[],i=t.getSelections();for(const r of i)n.push(new dhe(r,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class uhe extends NV{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:m("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:A.writable})}}class hhe extends NV{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:m("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:A.writable})}}te(uhe);te(hhe);class fhe extends fe{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:A.writable,kbOpts:{kbExpr:A.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const n=t.getModel(),i=[],r=t.getSelections();for(const s of r){if(!s.isEmpty())continue;const a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;const d=l===c?s.getPosition():Ct.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),u=Ct.leftPosition(n,d),h=Ct.leftPosition(n,u),f=n.getValueInRange(T.fromPositions(h,u)),p=n.getValueInRange(T.fromPositions(u,d)),g=T.fromPositions(h,d);i.push(new Ci(g,p+f))}i.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}te(fhe);const oE=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(n){for(let i=0;i<n.length;i++)n[i]=Math.floor(Math.random()*256);return n};const e=new Uint8Array(16),t=[];for(let n=0;n<256;n++)t.push(n.toString(16).padStart(2,"0"));return function(){o(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let i=0,r="";return r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r}}();function r6(o){return{asString:async()=>o,asFile:()=>{},value:typeof o=="string"?o:void 0}}function phe(o,e,t){const n={id:oE(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>n,value:void 0}}class RV{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return lt.some(this,([n,i])=>i.asFile())&&t.push("files"),OV(sw(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const n of t)yield[e,n]}toKey(e){return sw(e)}}function sw(o){return o.toLowerCase()}function MV(o,e){return OV(sw(o),e.map(sw))}function OV(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[n,i,r]=t;return r==="*"?e.some(s=>s.startsWith(i+"/")):!1}const sE=Object.freeze({create:o=>Nd(o.map(e=>e.toString())).join(`\r
|
|
669
|
+
*-----------------------------------------------------------------------------*/var Fue=Object.defineProperty,Bue=Object.getOwnPropertyDescriptor,Vue=Object.getOwnPropertyNames,Wue=Object.prototype.hasOwnProperty,Uue=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Vue(e))!Wue.call(o,i)&&i!==t&&Fue(o,i,{get:()=>e[i],enumerable:!(n=Bue(e,i))||n.enumerable});return o},Hue=(o,e,t)=>(Uue(o,e,"default"),t),Gue="5.0.2",Am={};Hue(Am,YC);var vV=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(vV||{}),SV=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(SV||{}),wV=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(wV||{}),CV=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(CV||{}),EV=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(EV||{}),xV=class{constructor(o,e,t,n,i){this._onDidChange=new Am.Emitter,this._onDidExtraLibsChange=new Am.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},zue=Gue,TV={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},LV=new xV({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},TV),kV=new xV({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},TV),jue=()=>nE().then(o=>o.getTypeScriptWorker()),Kue=()=>nE().then(o=>o.getJavaScriptWorker());Am.languages.typescript={ModuleKind:vV,JsxEmit:SV,NewLineKind:wV,ScriptTarget:CV,ModuleResolutionKind:EV,typescriptVersion:zue,typescriptDefaults:LV,javascriptDefaults:kV,getTypeScriptWorker:jue,getJavaScriptWorker:Kue};function nE(){return ye(()=>import("./tsMode-D-YLfP_n.js"),__vite__mapDeps([17,1,2,3]))}Am.languages.onLanguage("typescript",()=>nE().then(o=>o.setupTypeScript(LV)));Am.languages.onLanguage("javascript",()=>nE().then(o=>o.setupJavaScript(kV)));class que extends To{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:Br("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:se.map,toggled:J.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:J.has("isInDiffEditor"),menu:{when:J.has("isInDiffEditor"),id:L.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const n=e.get(rt),i=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}}Jt(que);class AV extends To{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:Br("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:J.has("isInDiffEditor")})}run(e,...t){const n=e.get(rt),i=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",i)}}Jt(AV);class IV extends To{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:Br("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:J.has("isInDiffEditor")})}run(e,...t){const n=e.get(rt),i=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}}Jt(IV);yi.appendMenuItem(L.EditorTitle,{command:{id:new IV().desc.id,title:m("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:J.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:J.has("isInDiffEditor")},order:11,group:"1_diff",when:J.and(A.diffEditorRenderSideBySideInlineBreakpointReached,J.has("isInDiffEditor"))});yi.appendMenuItem(L.EditorTitle,{command:{id:new AV().desc.id,title:m("showMoves","Show Moved Code Blocks"),icon:se.move,toggled:Gm.create("config.diffEditor.experimental.showMoves",!0),precondition:J.has("isInDiffEditor")},order:10,group:"1_diff",when:J.has("isInDiffEditor")});const iE={value:m("diffEditor","Diff Editor"),original:"Diff Editor"};class $ue extends ma{constructor(){super({id:"diffEditor.switchSide",title:Br("switchSide","Switch Side"),icon:se.arrowSwap,precondition:J.has("isInDiffEditor"),f1:!0,category:iE})}runEditorCommand(e,t,n){const i=ig(e);if(i instanceof qd){if(n&&n.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}}Jt($ue);class Jue extends ma{constructor(){super({id:"diffEditor.exitCompareMove",title:Br("exitCompareMove","Exit Compare Move"),icon:se.close,precondition:A.comparingMovedCode,f1:!1,category:iE,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){const i=ig(e);i instanceof qd&&i.exitCompareMove()}}Jt(Jue);class Xue extends ma{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:Br("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:se.fold,precondition:J.has("isInDiffEditor"),f1:!0,category:iE})}runEditorCommand(e,t,...n){const i=ig(e);i instanceof qd&&i.collapseAllUnchangedRegions()}}Jt(Xue);class Yue extends ma{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:Br("showAllUnchangedRegions","Show All Unchanged Regions"),icon:se.unfold,precondition:J.has("isInDiffEditor"),f1:!0,category:iE})}runEditorCommand(e,t,...n){const i=ig(e);i instanceof qd&&i.showAllUnchangedRegions()}}Jt(Yue);const DV={value:m("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class ng extends To{constructor(){super({id:ng.id,title:Br("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:DV,precondition:J.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=ig(e);t==null||t.accessibleDiffViewerNext()}}ng.id="editor.action.accessibleDiffViewer.next";yi.appendMenuItem(L.EditorTitle,{command:{id:ng.id,title:m("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:J.has("isInDiffEditor")},order:10,group:"2_diff",when:J.and(A.accessibleDiffViewerVisible.negate(),J.has("isInDiffEditor"))});class ry extends To{constructor(){super({id:ry.id,title:Br("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:DV,precondition:J.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=ig(e);t==null||t.accessibleDiffViewerPrev()}}ry.id="editor.action.accessibleDiffViewer.prev";function ig(o){const t=o.get(gt).listDiffEditors(),n=Ai();if(n)for(const i of t){const r=i.getContainerDomNode();if(Que(r,n))return i}return null}function Que(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}ct.registerCommandAlias("editor.action.diffReview.next",ng.id);Jt(ng);ct.registerCommandAlias("editor.action.diffReview.prev",ry.id);Jt(ry);var Zue=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ehe=function(o,e){return function(t,n){e(t,n,o)}},PA;const rE=new ce("selectionAnchorSet",!1);let bc=PA=class{static get(e){return e.getContribution(PA.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=rE.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(_e.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Pi().appendText(m("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),$r(m("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(_e.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};bc.ID="editor.contrib.selectionAnchorController";bc=PA=Zue([ehe(1,Oe)],bc);class the extends fe{constructor(){super({id:"editor.action.setSelectionAnchor",label:m("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:A.editorTextFocus,primary:Gn(2089,2080),weight:100}})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.setSelectionAnchor()}}class nhe extends fe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:m("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:rE})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.goToSelectionAnchor()}}class ihe extends fe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:m("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:rE,kbOpts:{kbExpr:A.editorTextFocus,primary:Gn(2089,2089),weight:100}})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.selectFromAnchorToCursor()}}class rhe extends fe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:m("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:rE,kbOpts:{kbExpr:A.editorTextFocus,primary:9,weight:100}})}async run(e,t){var n;(n=bc.get(t))===null||n===void 0||n.cancelSelectionAnchor()}}_t(bc.ID,bc,4);te(the);te(nhe);te(ihe);te(rhe);const ohe=I("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},m("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class she extends fe{constructor(){super({id:"editor.action.jumpToBracket",label:m("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:A.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=_s.get(t))===null||n===void 0||n.jumpToBracket()}}class ahe extends fe{constructor(){super({id:"editor.action.selectToBracket",label:m("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:Br("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=_s.get(t))===null||i===void 0||i.selectToBracket(r)}}class lhe extends fe{constructor(){super({id:"editor.action.removeBrackets",label:m("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:A.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=_s.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class che{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class _s extends U{static get(e){return e.getContribution(_s.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Dt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let s=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?s=r[1].getStartPosition():r[1].containsPosition(i)&&(s=r[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(i);if(a)s=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(i);l&&l.range&&(s=l.range.getStartPosition())}}return s?new _e(s.lineNumber,s.column,s.lineNumber,s.column):new _e(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let s=t.bracketPairs.matchBracket(r);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(r),!s)){const c=t.bracketPairs.findNextBracket(r);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(T.compareRangesUsingStarts);const[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(r)){const u=a;a=l,l=u}}a&&l&&n.push(new _e(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let s=0;for(let u=0,h=e.length;u<h;u++){const f=e[u];f.isEmpty()&&(r[s++]=f.getStartPosition())}r.length>1&&r.sort(F.compare);const a=[];let l=0,c=0;const d=i.length;for(let u=0,h=r.length;u<h;u++){const f=r[u];for(;c<d&&i[c].position.isBefore(f);)c++;if(c<d&&i[c].position.equals(f))a[l++]=i[c];else{let p=t.bracketPairs.matchBracket(f,20),g=_s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(f,20),g=_s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new che(f,p,g)}}this._lastBracketsData=a,this._lastVersionId=n}}_s.ID="editor.contrib.bracketMatchingController";_s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=He.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ln(ohe),position:wo.Center}});_s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=He.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});_t(_s.ID,_s,1);te(ahe);te(she);te(lhe);yi.appendMenuItem(L.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m({},"Go to &&Bracket")},order:2});class dhe{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const n=this._selection.startLineNumber,i=this._selection.startColumn,r=this._selection.endColumn;if(!(this._isMovingLeft&&i===1)&&!(!this._isMovingLeft&&r===e.getLineMaxColumn(n)))if(this._isMovingLeft){const s=new T(n,i-1,n,i),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new T(n,r,n,r),a)}else{const s=new T(n,r,n,r+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new T(n,i,n,i),a)}}computeCursorState(e,t){return this._isMovingLeft?new _e(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new _e(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class NV extends fe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const n=[],i=t.getSelections();for(const r of i)n.push(new dhe(r,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class uhe extends NV{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:m("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:A.writable})}}class hhe extends NV{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:m("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:A.writable})}}te(uhe);te(hhe);class fhe extends fe{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:A.writable,kbOpts:{kbExpr:A.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const n=t.getModel(),i=[],r=t.getSelections();for(const s of r){if(!s.isEmpty())continue;const a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;const d=l===c?s.getPosition():Ct.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),u=Ct.leftPosition(n,d),h=Ct.leftPosition(n,u),f=n.getValueInRange(T.fromPositions(h,u)),p=n.getValueInRange(T.fromPositions(u,d)),g=T.fromPositions(h,d);i.push(new Ci(g,p+f))}i.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}te(fhe);const oE=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(n){for(let i=0;i<n.length;i++)n[i]=Math.floor(Math.random()*256);return n};const e=new Uint8Array(16),t=[];for(let n=0;n<256;n++)t.push(n.toString(16).padStart(2,"0"));return function(){o(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let i=0,r="";return r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+="-",r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r+=t[e[i++]],r}}();function r6(o){return{asString:async()=>o,asFile:()=>{},value:typeof o=="string"?o:void 0}}function phe(o,e,t){const n={id:oE(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>n,value:void 0}}class RV{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return lt.some(this,([n,i])=>i.asFile())&&t.push("files"),OV(sw(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const n of t)yield[e,n]}toKey(e){return sw(e)}}function sw(o){return o.toLowerCase()}function MV(o,e){return OV(sw(o),e.map(sw))}function OV(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[n,i,r]=t;return r==="*"?e.some(s=>s.startsWith(i+"/")):!1}const sE=Object.freeze({create:o=>Nd(o.map(e=>e.toString())).join(`\r
|
|
670
670
|
`),split:o=>o.split(`\r
|
|
671
671
|
`),parse:o=>sE.split(o).filter(e=>!e.startsWith("#"))}),k3={EDITORS:"CodeEditors",FILES:"CodeFiles"};class mhe{}const ghe={DragAndDropContribution:"workbench.contributions.dragAndDrop"};rn.add(ghe.DragAndDropContribution,new mhe);class e0{constructor(){}static getInstance(){return e0.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}e0.INSTANCE=new e0;function PV(o){const e=new RV;for(const t of o.items){const n=t.type;if(t.kind==="string"){const i=new Promise(r=>t.getAsString(r));e.append(n,r6(i))}else if(t.kind==="file"){const i=t.getAsFile();i&&e.append(n,_he(i))}}return e}function _he(o){const e=o.path?Te.parse(o.path):void 0;return phe(o.name,e,async()=>new Uint8Array(await o.arrayBuffer()))}const yhe=Object.freeze([k3.EDITORS,k3.FILES,F1.RESOURCES,F1.INTERNAL_URI_LIST]);function FV(o,e=!1){const t=PV(o),n=t.get(F1.INTERNAL_URI_LIST);if(n)t.replace(pn.uriList,n);else if(e||!t.has(pn.uriList)){const i=[];for(const r of o.items){const s=r.getAsFile();if(s){const a=s.path;try{a?i.push(Te.file(a).toString()):i.push(Te.parse(s.name,!0).toString())}catch{}}}i.length&&t.replace(pn.uriList,r6(sE.create(i)))}for(const i of yhe)t.delete(i);return t}class ss{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,n=this.value.charCodeAt(e),i;if(i=ss._table[n],typeof i=="number")return this.pos+=1,{type:i,pos:e,len:1};if(ss.isDigitCharacter(n)){i=8;do t+=1,n=this.value.charCodeAt(e+t);while(ss.isDigitCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}if(ss.isVariableCharacter(n)){i=9;do n=this.value.charCodeAt(e+ ++t);while(ss.isVariableCharacter(n)||ss.isDigitCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}i=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof ss._table[n]>"u"&&!ss.isDigitCharacter(n)&&!ss.isVariableCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}}ss._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class rg{constructor(){this._children=[]}appendChild(e){return e instanceof or&&this._children[this._children.length-1]instanceof or?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:n}=e,i=n.children.indexOf(e),r=n.children.slice(0);r.splice(i,1,...t),n._children=r,function s(a,l){for(const c of a)c.parent=l,s(c.children,c)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof oy)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class or extends rg{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new or(this.value)}}class BV extends rg{}class Ro extends BV{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof og?this._children[0]:void 0}clone(){const e=new Ro(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class og extends rg{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof or&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new og;return this.options.forEach(e.appendChild,e),e}}class o6 extends rg{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let n=!1,i=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(r=>r instanceof Bs&&!!r.elseValue)&&(i=this._replace([])),i}_replace(e){let t="";for(const n of this._children)if(n instanceof Bs){let i=e[n.index]||"";i=n.resolve(i),t+=i}else t+=n.toString();return t}toString(){return""}clone(){const e=new o6;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class Bs extends rg{constructor(e,t,n,i){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=i}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((n,i)=>i===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new Bs(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class t0 extends BV{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new or(t)],!0):!1}clone(){const e=new t0(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function A3(o,e){const t=[...o];for(;t.length>0;){const n=t.shift();if(!e(n))break;t.unshift(...n.children)}}class oy extends rg{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(n){return n instanceof Ro&&(e.push(n),t=!t||t.index<n.index?n:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,n=!1;return this.walk(i=>i===e?(n=!0,!1):(t+=i.len(),!0)),n?t:-1}fullLen(e){let t=0;return A3([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:n}=e;for(;n;)n instanceof Ro&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof t0&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new oy;return this._children=this.children.map(t=>t.clone()),e}walk(e){A3(this.children,e)}}class Gh{constructor(){this._scanner=new ss,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){const i=new oy;return this.parseFragment(e,i),this.ensureFinalTabstop(i,n??!1,t??!1),i}parseFragment(e,t){const n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const i=new Map,r=[];t.walk(l=>(l instanceof Ro&&(l.isFinalTabstop?i.set(0,void 0):!i.has(l.index)&&l.children.length>0?i.set(l.index,l.children):r.push(l)),!0));const s=(l,c)=>{const d=i.get(l.index);if(!d)return;const u=new Ro(l.index);u.transform=l.transform;for(const h of d){const f=h.clone();u.appendChild(f),f instanceof Ro&&i.has(f.index)&&!c.has(f.index)&&(c.add(f.index),s(f,c),c.delete(f.index))}t.replace(l,[u])},a=new Set;for(const l of r)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(r=>r.index===0)||e.appendChild(new Ro(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const i=this._scanner.next();if(i.type!==0&&i.type!==4&&i.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new or(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Ro(Number(t)):new t0(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);const r=new Ro(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new or("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else if(r.index>0&&this._accept(7)){const s=new og;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(s),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseChoiceElement(e){const t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let i;if((i=this._accept(5,!0))?i=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||i:i=this._accept(void 0,!0),!i)return this._backTo(t),!1;n.push(i)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new or(n.join(""))),!0)}_parseComplexVariable(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);const r=new t0(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new or("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseTransform(e){const t=new o6;let n="",i="";for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(6,!0)||r,n+=r;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(5,!0)||this._accept(6,!0)||r,t.appendChild(new or(r));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,i)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const i=this._accept(8,!0);if(i)if(n){if(this._accept(4))return e.appendChild(new Bs(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Bs(Number(i))),!0;else return this._backTo(t),!1;if(this._accept(6)){const r=this._accept(9,!0);return!r||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Bs(Number(i),r)),!0)}else if(this._accept(11)){const r=this._until(4);if(r)return e.appendChild(new Bs(Number(i),void 0,r,void 0)),!0}else if(this._accept(12)){const r=this._until(4);if(r)return e.appendChild(new Bs(Number(i),void 0,void 0,r)),!0}else if(this._accept(13)){const r=this._until(1);if(r){const s=this._until(4);if(s)return e.appendChild(new Bs(Number(i),void 0,r,s)),!0}}else{const r=this._until(4);if(r)return e.appendChild(new Bs(Number(i),void 0,void 0,r)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new or(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function VV(o,e,t){var n,i,r,s;return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:(i=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&i!==void 0?i:[]}:{edits:[...e.map(a=>new wd(o,{range:a,text:typeof t.insertText=="string"?Gh.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...(s=(r=t.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&s!==void 0?s:[]]}}function WV(o){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}const n=new Map;for(const a of o)for(const l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(const c of o)if(c!==a&&t(l,c)){let d=n.get(a);d||(d=[],n.set(a,d)),d.push(c)}if(!n.size)return Array.from(o);const i=new Set,r=[];function s(a){if(!a.length)return[];const l=a[0];if(r.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(i.has(l))return s(a.slice(1));let c=[];const d=n.get(l);return d&&(r.push(l),c=s(d),r.pop()),i.add(l),[...c,l,...s(a.slice(1))]}return s(Array.from(o))}var bhe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vhe=function(o,e){return function(t,n){e(t,n,o)}};const She=He.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:KP,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class aE extends U{constructor(e,t,n,i,r){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(i),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Z(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=Z("span.icon");this.domNode.append(t),t.classList.add(...ke.asClassNameArray(se.loading),"codicon-modifier-spin");const n=()=>{const i=this.editor.getOption(66);this.domNode.style.height=`${i}px`,this.domNode.style.width=`${Math.ceil(.8*i)}px`};n(),this._register(this.editor.onDidChangeConfiguration(i=>{(i.hasChanged(52)||i.hasChanged(66))&&n()})),this._register(z(this.domNode,re.CLICK,i=>{this.delegate.cancel()}))}getId(){return aE.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}aE.baseId="editor.widget.inlineProgressWidget";let aw=class extends U{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new ci),this._currentWidget=new ci,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}async showWhile(e,t,n){const i=this._operationIdPool++;this._currentOperation=i,this.clear(),this._showPromise.value=Bd(()=>{const r=T.fromPositions(e);this._currentDecorations.set([{range:r,options:She}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(aE,this.id,this._editor,r,t,n))},this._showDelay);try{return await n}finally{this._currentOperation===i&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};aw=bhe([vhe(2,Ae)],aw);var UV=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},B_=function(o,e){return function(t,n){e(t,n,o)}},FA;let lw=FA=class extends U{constructor(e,t,n,i,r,s,a,l,c,d){super(),this.typeId=e,this.editor=t,this.showCommand=i,this.range=r,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=d,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(Le(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Le(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{r.containsPosition(u.position)||this.dispose()})),this._register(le.runAndSubscribe(d.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=Z(".post-edit-widget"),this.button=this._register(new KS(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(z(this.domNode,re.CLICK,()=>this.showSelector()))}getId(){return FA.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Fn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>xp({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};lw.baseId="editor.widget.postEditWidget";lw=FA=UV([B_(7,ko),B_(8,Oe),B_(9,It)],lw);let cw=class extends U{constructor(e,t,n,i,r,s){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=i,this._instantiationService=r,this._bulkEditService=s,this._currentWidget=this._register(new ci),this._register(le.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,n,i){const r=this._editor.getModel();if(!r||!e.length)return;const s=t.allEdits[t.activeEditIndex];if(!s)return;const a=VV(r.uri,e,s),l=e[0],c=r.deltaDecorations([],[{range:l,options:{description:"paste-line-suffix",stickiness:0}}]);let d,u;try{d=await this._bulkEditService.apply(a,{editor:this._editor,token:i}),u=r.getDecorationRange(c[0])}finally{r.deltaDecorations(c,[])}n&&d.isApplied&&t.allEdits.length>1&&this.show(u??l,t,async h=>{const f=this._editor.getModel();f&&(await f.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:h,allEdits:t.allEdits},n,i))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(lw,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};cw=UV([B_(4,Ae),B_(5,K0)],cw);var whe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},I3=function(o,e){return function(t,n){e(t,n,o)}},_v;let ur=_v=class{static get(e){return e.getContribution(_v.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new ci,this._messageListeners=new Y,this._mouseOverMessage=!1,this._editor=e,this._visible=_v.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){$r(al(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=al(e)?LC(e,{actionHandler:{callback:i=>{this.closeMessage(),hR(this._openerService,i,al(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new D3(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(le.debounce(this._editor.onDidBlurEditorText,(i,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&bi(Ai(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(z(this._messageWidget.value.getDomNode(),re.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(z(this._messageWidget.value.getDomNode(),re.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(i=>{i.target.position&&(n?n.containsPosition(i.target.position)||this.closeMessage():n=new T(t.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(D3.fadeOut(this._messageWidget.value))}};ur.ID="editor.contrib.messageController";ur.MESSAGE_VISIBLE=new ce("messageVisible",!1,m("messageVisible","Whether the editor is currently showing an inline message"));ur=_v=whe([I3(1,Oe),I3(2,Mr)],ur);const Che=di.bindToContribution(ur.get);ae(new Che({id:"leaveEditorMessage",precondition:ur.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:130,primary:9}}));let D3=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const s=document.createElement("div");typeof i=="string"?(s.classList.add("message"),s.textContent=i):(i.classList.add("message"),s.appendChild(i)),this._domNode.appendChild(s);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};_t(ur.ID,ur,4);var Ehe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Of=function(o,e){return function(t,n){e(t,n,o)}},BA;const HV="editor.changePasteType",GV=new ce("pasteWidgetVisible",!1,m("pasteWidgetVisible","Whether the paste widget is showing")),A2="application/vnd.code.copyMetadata";let vc=BA=class extends U{static get(e){return e.getContribution(BA.ID)}constructor(e,t,n,i,r,s,a){super(),this._bulkEditService=n,this._clipboardService=i,this._languageFeaturesService=r,this._quickInputService=s,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register(z(l,"copy",c=>this.handleCopy(c))),this._register(z(l,"cut",c=>this.handleCopy(c))),this._register(z(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new aw("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(cw,"pasteIntoEditor",e,GV,{id:HV,label:m("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},zm().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var t,n;if(!this._editor.hasTextFocus()||(au&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const i=this._editor.getModel(),r=this._editor.getSelections();if(!i||!(r!=null&&r.length))return;const s=this._editor.getOption(37);let a=r;const l=r.length===1&&r[0].isEmpty();if(l){if(!s)return;a=[new T(a[0].startLineNumber,1,a[0].startLineNumber,1+i.getLineLength(a[0].startLineNumber))]}const c=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(r,s,Bi),u={multicursorText:Array.isArray(c)?c:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(y=>!!y.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}const f=PV(e.clipboardData),p=h.flatMap(y=>{var b;return(b=y.copyMimeTypes)!==null&&b!==void 0?b:[]}),g=oE();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:p,defaultPastePayload:u});const _=ei(async y=>{const b=na(await Promise.all(h.map(async v=>{try{return await v.prepareDocumentPaste(i,a,f,y)}catch(S){console.error(S);return}})));b.reverse();for(const v of b)for(const[S,w]of v)f.replace(S,w);return f});(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:_}}async handlePaste(e){var t,n,i,r,s;if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=ur.get(this._editor))===null||t===void 0||t.closeMessage(),(n=this._currentPasteOperation)===null||n===void 0||n.cancel(),this._currentPasteOperation=void 0;const a=this._editor.getModel(),l=this._editor.getSelections();if(!(l!=null&&l.length)||!a||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const c=this.fetchCopyMetadata(e),d=FV(e.clipboardData);d.delete(A2);const u=[...e.clipboardData.types,...(i=c==null?void 0:c.providerCopyMimeTypes)!==null&&i!==void 0?i:[],pn.uriList],h=this._languageFeaturesService.documentPasteEditProvider.ordered(a).filter(f=>{var p,g;return!((p=this._pasteAsActionContext)===null||p===void 0)&&p.preferredId&&this._pasteAsActionContext.preferredId!==f.id?!1:(g=f.pasteMimeTypes)===null||g===void 0?void 0:g.some(_=>MV(_,u))});if(!h.length){!((r=this._pasteAsActionContext)===null||r===void 0)&&r.preferredId&&this.showPasteAsNoEditMessage(l,(s=this._pasteAsActionContext)===null||s===void 0?void 0:s.preferredId);return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,h,l,d,c,{trigger:"explicit",only:this._pasteAsActionContext.preferredId}):this.doPasteInline(h,l,d,c,{trigger:"implicit"})}showPasteAsNoEditMessage(e,t){var n;(n=ur.get(this._editor))===null||n===void 0||n.showMessage(m("pasteAsError","No paste edits for '{0}' found",t),e[0].getStartPosition())}doPasteInline(e,t,n,i,r){const s=ei(async a=>{const l=this._editor;if(!l.hasModel())return;const c=l.getModel(),d=new $d(l,3,void 0,a);try{if(await this.mergeInDataFromCopy(n,i,d.token),d.token.isCancellationRequested)return;const u=e.filter(f=>N3(f,n));if(!u.length||u.length===1&&u[0].id==="text"){await this.applyDefaultPasteHandler(n,i,d.token);return}const h=await this.getPasteEdits(u,n,c,t,r,d.token);if(d.token.isCancellationRequested)return;if(h.length===1&&h[0].providerId==="text"){await this.applyDefaultPasteHandler(n,i,d.token);return}if(h.length){const f=l.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:h},f,d.token)}await this.applyDefaultPasteHandler(n,i,d.token)}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),m("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,n,i,r,s){const a=ei(async l=>{const c=this._editor;if(!c.hasModel())return;const d=c.getModel(),u=new $d(c,3,void 0,l);try{if(await this.mergeInDataFromCopy(i,r,u.token),u.token.isCancellationRequested)return;let h=t.filter(_=>N3(_,i));e&&(h=h.filter(_=>_.id===e));const f=await this.getPasteEdits(h,i,d,n,s,u.token);if(u.token.isCancellationRequested)return;if(!f.length){s.only&&this.showPasteAsNoEditMessage(n,s.only);return}let p;if(e)p=f.at(0);else{const _=await this._quickInputService.pick(f.map(y=>({label:y.label,description:y.providerId,detail:y.detail,edit:y})),{placeHolder:m("pasteAsPickerPlaceholder","Select Paste Action")});p=_==null?void 0:_.edit}if(!p)return;const g=VV(d.uri,n,p);await this._bulkEditService.apply(g,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:m("pasteAsProgress","Running paste handlers")},()=>a)}setCopyMetadata(e,t){e.setData(A2,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const n=e.clipboardData.getData(A2);if(n)try{return JSON.parse(n)}catch{return}const[i,r]=FL.getTextData(e.clipboardData);if(r)return{defaultPastePayload:{mode:r.mode,multicursorText:(t=r.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!r.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,n){var i;if(t!=null&&t.id&&((i=this._currentCopyOperation)===null||i===void 0?void 0:i.handle)===t.id){const r=await this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(const[s,a]of r)e.replace(s,a)}if(!e.has(pn.uriList)){const r=await this._clipboardService.readResources();if(n.isCancellationRequested)return;r.length&&e.append(pn.uriList,r6(sE.create(r)))}}async getPasteEdits(e,t,n,i,r,s){const a=await Kw(Promise.all(e.map(async c=>{var d;try{const u=await((d=c.provideDocumentPasteEdits)===null||d===void 0?void 0:d.call(c,n,i,t,r,s));if(u)return{...u,providerId:c.id}}catch(u){console.error(u)}})),s),l=na(a??[]);return WV(l)}async applyDefaultPasteHandler(e,t,n){var i,r,s;const a=(i=e.get(pn.text))!==null&&i!==void 0?i:e.get("text");if(!a)return;const l=await a.asString();if(n.isCancellationRequested)return;const c={text:l,pasteOnNewLine:(r=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&r!==void 0?r:!1,multicursorText:(s=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&s!==void 0?s:null,mode:null};this._editor.trigger("keyboard","paste",c)}};vc.ID="editor.contrib.copyPasteActionController";vc=BA=Ehe([Of(1,Ae),Of(2,K0),Of(3,xc),Of(4,pe),Of(5,ya),Of(6,WF)],vc);function N3(o,e){var t;return!!(!((t=o.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}const zh="9_cutcopypaste",xhe=dl||document.queryCommandSupported("cut"),zV=dl||document.queryCommandSupported("copy"),The=typeof navigator.clipboard>"u"||zo?document.queryCommandSupported("paste"):!0;function s6(o){return o.register(),o}const Lhe=xhe?s6(new jm({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:dl?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:L.MenubarEditMenu,group:"2_ccp",title:m({},"Cu&&t"),order:1},{menuId:L.EditorContext,group:zh,title:m("actions.clipboard.cutLabel","Cut"),when:A.writable,order:1},{menuId:L.CommandPalette,group:"",title:m("actions.clipboard.cutLabel","Cut"),order:1},{menuId:L.SimpleEditorContext,group:zh,title:m("actions.clipboard.cutLabel","Cut"),when:A.writable,order:1}]})):void 0,khe=zV?s6(new jm({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:dl?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:L.MenubarEditMenu,group:"2_ccp",title:m({},"&&Copy"),order:2},{menuId:L.EditorContext,group:zh,title:m("actions.clipboard.copyLabel","Copy"),order:2},{menuId:L.CommandPalette,group:"",title:m("actions.clipboard.copyLabel","Copy"),order:1},{menuId:L.SimpleEditorContext,group:zh,title:m("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;yi.appendMenuItem(L.MenubarEditMenu,{submenu:L.MenubarCopy,title:{value:m("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});yi.appendMenuItem(L.EditorContext,{submenu:L.EditorContextCopy,title:{value:m("copy as","Copy As"),original:"Copy As"},group:zh,order:3});yi.appendMenuItem(L.EditorContext,{submenu:L.EditorContextShare,title:{value:m("share","Share"),original:"Share"},group:"11_share",order:-1,when:J.and(J.notEquals("resourceScheme","output"),A.editorTextFocus)});yi.appendMenuItem(L.EditorTitleContext,{submenu:L.EditorTitleContextShare,title:{value:m("share","Share"),original:"Share"},group:"11_share",order:-1});yi.appendMenuItem(L.ExplorerContext,{submenu:L.ExplorerContextShare,title:{value:m("share","Share"),original:"Share"},group:"11_share",order:-1});const I2=The?s6(new jm({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:dl?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:L.MenubarEditMenu,group:"2_ccp",title:m({},"&&Paste"),order:4},{menuId:L.EditorContext,group:zh,title:m("actions.clipboard.pasteLabel","Paste"),when:A.writable,order:4},{menuId:L.CommandPalette,group:"",title:m("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:L.SimpleEditorContext,group:zh,title:m("actions.clipboard.pasteLabel","Paste"),when:A.writable,order:4}]})):void 0;class Ahe extends fe{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:m("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:A.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(OL.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),OL.forceCopyWithSyntaxHighlighting=!1)}}function jV(o,e){o&&(o.addImplementation(1e4,"code-editor",(t,n)=>{const i=t.get(gt).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const r=i.getOption(37),s=i.getSelection();return s&&s.isEmpty()&&!r||i.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,n)=>(zm().execCommand(e),!0)))}jV(Lhe,"cut");jV(khe,"copy");I2&&(I2.addImplementation(1e4,"code-editor",(o,e)=>{var t,n;const i=o.get(gt),r=o.get(xc),s=i.getFocusedCodeEditor();return s&&s.hasTextFocus()?s.getContainerDomNode().ownerDocument.execCommand("paste")?(n=(t=vc.get(s))===null||t===void 0?void 0:t.finishedPaste())!==null&&n!==void 0?n:Promise.resolve():au?(async()=>{const l=await r.readText();if(l!==""){const c=S1.INSTANCE.get(l);let d=!1,u=null,h=null;c&&(d=s.getOption(37)&&!!c.isFromEmptySelection,u=typeof c.multicursorText<"u"?c.multicursorText:null,h=c.mode),s.trigger("keyboard","paste",{text:l,pasteOnNewLine:d,multicursorText:u,mode:h})}})():!0:!1}),I2.addImplementation(0,"generic-dom",(o,e)=>(zm().execCommand("paste"),!0)));zV&&te(Ahe);class Me{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Me.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Me(this.value+Me.sep+e)}}Me.sep=".";Me.None=new Me("@@none@@");Me.Empty=new Me("");Me.QuickFix=new Me("quickfix");Me.Refactor=new Me("refactor");Me.RefactorExtract=Me.Refactor.append("extract");Me.RefactorInline=Me.Refactor.append("inline");Me.RefactorMove=Me.Refactor.append("move");Me.RefactorRewrite=Me.Refactor.append("rewrite");Me.Notebook=new Me("notebook");Me.Source=new Me("source");Me.SourceOrganizeImports=Me.Source.append("organizeImports");Me.SourceFixAll=Me.Source.append("fixAll");Me.SurroundWith=Me.Refactor.append("surround");var Jr;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(Jr||(Jr={}));function Ihe(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>KV(e,t,o.include))||!o.includeSourceActions&&Me.Source.contains(e))}function Dhe(o,e){const t=e.kind?new Me(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(n=>KV(t,n,o.include))||!o.includeSourceActions&&t&&Me.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function KV(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class Ka{static fromUser(e,t){return!e||typeof e!="object"?new Ka(t.kind,t.apply,!1):new Ka(Ka.getKindFromUser(e,t.kind),Ka.getApplyFromUser(e,t.apply),Ka.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Me(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class Nhe{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}async resolve(e){var t;if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=await this.provider.resolveCodeAction(this.action,e)}catch(i){Bn(i)}n&&(this.action.edit=n.edit)}return this}}const qV="editor.action.codeAction",a6="editor.action.quickFix",$V="editor.action.autoFix",JV="editor.action.refactor",XV="editor.action.sourceAction",l6="editor.action.organizeImports",c6="editor.action.fixAll";class V_ extends U{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:Fi(e.diagnostics)?Fi(t.diagnostics)?V_.codeActionsPreferredComparator(e,t):-1:Fi(t.diagnostics)?1:V_.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(V_.codeActionsComparator),this.validActions=this.allActions.filter(({action:i})=>!i.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Me.QuickFix.contains(new Me(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const R3={actions:[],documentation:void 0};async function W_(o,e,t,n,i,r){var s;const a=n.filter||{},l={...a,excludes:[...a.excludes||[],Me.Notebook]},c={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:n.type},d=new QR(e,r),u=n.type===2,h=Rhe(o,e,u?l:a),f=new Y,p=h.map(async _=>{try{i.report(_);const y=await _.provideCodeActions(e,t,c,d.token);if(y&&f.add(y),d.token.isCancellationRequested)return R3;const b=((y==null?void 0:y.actions)||[]).filter(S=>S&&Dhe(a,S)),v=Ohe(_,b,a.include);return{actions:b.map(S=>new Nhe(S,_)),documentation:v}}catch(y){if(fa(y))throw y;return Bn(y),R3}}),g=o.onDidChange(()=>{const _=o.all(e);gn(_,h)||d.cancel()});try{const _=await Promise.all(p),y=_.map(v=>v.actions).flat(),b=[...na(_.map(v=>v.documentation)),...Mhe(o,e,n,y)];return new V_(y,b,f)}finally{g.dispose(),d.dispose()}}function Rhe(o,e,t){return o.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(i=>Ihe(t,new Me(i))):!0)}function*Mhe(o,e,t,n){var i,r,s;if(e&&n.length)for(const a of o.all(e))a._getAdditionalMenuItems&&(yield*(i=a._getAdditionalMenuItems)===null||i===void 0?void 0:i.call(a,{trigger:t.type,only:(s=(r=t.filter)===null||r===void 0?void 0:r.include)===null||s===void 0?void 0:s.value},n.map(l=>l.action)))}function Ohe(o,e,t){if(!o.documentation)return;const n=o.documentation.map(i=>({kind:new Me(i.kind),command:i.command}));if(t){let i;for(const r of n)r.kind.contains(t)&&(i?i.kind.contains(r.kind)&&(i=r):i=r);if(i)return i==null?void 0:i.command}for(const i of e)if(i.kind){for(const r of n)if(r.kind.contains(new Me(i.kind)))return r.command}}var jp;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions",o.FromAILightbulb="fromAILightbulb"})(jp||(jp={}));async function Phe(o,e,t,n,i=nt.None){var r;const s=o.get(K0),a=o.get(hn),l=o.get(Xr),c=o.get(Rn);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),await e.resolve(i),!i.isCancellationRequested&&!(!((r=e.action.edit)===null||r===void 0)&&r.edits.length&&!(await s.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==jp.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{await a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){const u=Fhe(d);c.error(typeof u=="string"?u:m("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function Fhe(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}ct.registerCommand("_executeCodeActionProvider",async function(o,e,t,n,i){if(!(e instanceof Te))throw Uo();const{codeActionProvider:r}=o.get(pe),s=o.get(Zt).getModel(e);if(!s)throw Uo();const a=_e.isISelection(t)?_e.liftSelection(t):T.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Uo();const l=typeof n=="string"?new Me(n):void 0,c=await W_(r,s,a,{type:1,triggerAction:Jr.Default,filter:{includeSourceActions:!0,include:l}},hc.None,nt.None),d=[],u=Math.min(c.validActions.length,typeof i=="number"?i:0);for(let h=0;h<u;h++)d.push(c.validActions[h].resolve(nt.None));try{return await Promise.all(d),c.validActions.map(h=>h.action)}finally{setTimeout(()=>c.dispose(),100)}});var Bhe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Vhe=function(o,e){return function(t,n){e(t,n,o)}},VA;let dw=VA=class{constructor(e){this.keybindingService=e}getResolver(){const e=new du(()=>this.keybindingService.getKeybindings().filter(t=>VA.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===l6?n={kind:Me.SourceOrganizeImports.value}:t.command===c6&&(n={kind:Me.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...Ka.fromUser(n,{kind:Me.None,apply:"never"})}}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new Me(e.kind);return t.filter(i=>i.kind.contains(n)).filter(i=>i.preferred?e.isPreferred:!0).reduceRight((i,r)=>i?i.kind.contains(r.kind)?r:i:r,void 0)}};dw.codeActionCommands=[JV,qV,XV,l6,c6];dw=VA=Bhe([Vhe(0,It)],dw);I("symbolIcon.arrayForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.booleanForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.colorForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.constantForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.fileForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.folderForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.keyForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.keywordForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.moduleForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.namespaceForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.nullForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.numberForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.objectForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.operatorForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.packageForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.propertyForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.referenceForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.snippetForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.stringForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.structForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.textForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.typeParameterForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.unitForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));I("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const YV=Object.freeze({kind:Me.Empty,title:m("codeAction.widget.id.more","More Actions...")}),Whe=Object.freeze([{kind:Me.QuickFix,title:m("codeAction.widget.id.quickfix","Quick Fix")},{kind:Me.RefactorExtract,title:m("codeAction.widget.id.extract","Extract"),icon:se.wrench},{kind:Me.RefactorInline,title:m("codeAction.widget.id.inline","Inline"),icon:se.wrench},{kind:Me.RefactorRewrite,title:m("codeAction.widget.id.convert","Rewrite"),icon:se.wrench},{kind:Me.RefactorMove,title:m("codeAction.widget.id.move","Move"),icon:se.wrench},{kind:Me.SurroundWith,title:m("codeAction.widget.id.surround","Surround With"),icon:se.surroundWith},{kind:Me.Source,title:m("codeAction.widget.id.source","Source Action"),icon:se.symbolFile},YV]);function Uhe(o,e,t){if(!e)return o.map(r=>{var s;return{kind:"action",item:r,group:YV,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title,canPreview:!!(!((s=r.action.edit)===null||s===void 0)&&s.edits.length)}});const n=Whe.map(r=>({group:r,actions:[]}));for(const r of o){const s=r.action.kind?new Me(r.action.kind):Me.None;for(const a of n)if(a.group.kind.contains(s)){a.actions.push(r);break}}const i=[];for(const r of n)if(r.actions.length){i.push({kind:"header",group:r.group});for(const s of r.actions){const a=r.group;i.push({kind:"action",item:s,group:s.action.isAI?{title:a.title,kind:a.kind,icon:se.sparkle}:a,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}}return i}var Hhe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},M3=function(o,e){return function(t,n){e(t,n,o)}},WA,yp;(function(o){o.Hidden={type:0};class e{constructor(n,i,r,s){this.actions=n,this.trigger=i,this.editorPosition=r,this.widgetPosition=s,this.type=1}}o.Showing=e})(yp||(yp={}));let jh=WA=class extends U{constructor(e,t,n){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new P),this.onClick=this._onClick.event,this._state=yp.Hidden,this._iconClasses=[],this._domNode=Z("div.lightBulbWidget"),this._register(Mt.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(rK(this._domNode,i=>{if(this.state.type!==1)return;this._editor.focus(),i.preventDefault();const{top:r,height:s}=Fn(this._domNode),a=this._editor.getOption(66);let l=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(l+=a),this._onClick.fire({x:i.posx,y:r+s+l,actions:this.state.actions,trigger:this.state.trigger})})),this._register(z(this._domNode,"mouseenter",i=>{(i.buttons&1)===1&&this.hide()})),this._register(le.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var i,r,s,a;this._preferredKbLabel=(r=(i=this._keybindingService.lookupKeybinding($V))===null||i===void 0?void 0:i.getLabel())!==null&&r!==void 0?r:void 0,this._quickFixKbLabel=(a=(s=this._keybindingService.lookupKeybinding(a6))===null||s===void 0?void 0:s.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();if(!this._editor.getOptions().get(64).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:s,column:a}=r.validatePosition(n),l=r.getOptions().tabSize,c=this._editor.getOptions().get(50),d=r.getLineContent(s),u=yC(d,l),h=c.spaceWidth*u>22,f=_=>_>2&&this._editor.getTopForLineNumber(_)===this._editor.getTopForLineNumber(_-1);let p=s,g=1;if(!h){if(s>1&&!f(s-1))p-=1;else if(s<r.getLineCount()&&!f(s+1))p+=1;else if(a*c.spaceWidth<22)return this.hide();g=/^\S\s*$/.test(r.getLineContent(p))?2:1}this.state=new yp.Showing(e,t,n,{position:{lineNumber:p,column:g},preference:WA._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==yp.Hidden&&(this.state=yp.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;let e,t=!1;this.state.actions.allAIFixes?(e=se.sparkleFilled,this.state.actions.validActions.length===1&&(t=!0)):this.state.actions.hasAutoFix?this.state.actions.hasAIFix?e=se.lightbulbSparkleAutofix:e=se.lightbulbAutofix:this.state.actions.hasAIFix?e=se.lightbulbSparkle:e=se.lightBulb,this._updateLightbulbTitle(this.state.actions.hasAutoFix,t),this._iconClasses=ke.asClassNameArray(e),this._domNode.classList.add(...this._iconClasses)}_updateLightbulbTitle(e,t){this.state.type===1&&(t?this.title=m("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=m("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=m("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=m("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};jh.ID="editor.contrib.lightbulbWidget";jh._posPref=[0];jh=WA=Hhe([M3(1,It),M3(2,hn)],jh);var QV=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},UA=function(o,e){return function(t,n){e(t,n,o)}};const ZV="acceptSelectedCodeAction",eW="previewSelectedCodeAction";class Ghe{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var i,r;n.text.textContent=(r=(i=e.group)===null||i===void 0?void 0:i.title)!==null&&r!==void 0?r:""}disposeTemplate(e){}}let HA=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const i=new Y0(e,mo);return{container:e,icon:t,text:n,keybinding:i}}renderElement(e,t,n){var i,r,s;if(!((i=e.group)===null||i===void 0)&&i.icon?(n.icon.className=ke.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=de(e.group.icon.color.id))):(n.icon.className=ke.asClassName(se.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=tW(e.label),n.keybinding.set(e.keybinding),vK(!!e.keybinding,n.keybinding.element);const a=(r=this._keybindingService.lookupKeybinding(ZV))===null||r===void 0?void 0:r.getLabel(),l=(s=this._keybindingService.lookupKeybinding(eW))===null||s===void 0?void 0:s.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:a&&l?this._supportsPreview&&e.canPreview?n.container.title=m({},"{0} to apply, {1} to preview",a,l):n.container.title=m({},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};HA=QV([UA(1,It)],HA);class zhe extends UIEvent{constructor(){super("acceptSelectedAction")}}class O3 extends UIEvent{constructor(){super("previewSelectedAction")}}function jhe(o){if(o.kind==="action")return o.label}let GA=class extends U{constructor(e,t,n,i,r,s){super(),this._delegate=i,this._contextViewService=r,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Dn),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new Cs(e,this.domNode,a,[new HA(t,this._keybindingService),new Ghe],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:jhe},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?tW(l==null?void 0:l.label):"";return l.disabled&&(c=m({},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>m({},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(hf),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);let r=e;if(this._allMenuItems.length>=50)r=380;else{const l=this._allMenuItems.map((c,d)=>{const u=this.domNode.ownerDocument.getElementById(this._list.getElementID(d));if(u){u.style.width="auto";const h=u.getBoundingClientRect().width;return u.style.width="",h}return 0});r=Math.max(...l,e)}const a=Math.min(i,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(a,r),this.domNode.style.height=`${a}px`,this._list.domFocus(),r}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],i=this._list.element(n);if(!this.focusCondition(i))return;const r=e?new O3:new zhe;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof O3):this._list.setSelection([])}onFocus(){var e,t;const n=this._list.getFocus();if(n.length===0)return;const i=n[0],r=this._list.element(i);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,r.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const n=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};GA=QV([UA(4,xl),UA(5,It)],GA);function tW(o){return o.replace(/\r\n|\r|\n/g," ")}var Khe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},D2=function(o,e){return function(t,n){e(t,n,o)}};I("actionBar.toggledBackground",{dark:ih,light:ih,hcDark:ih,hcLight:ih},m("actionBar.toggledBackground","Background color for toggled action items in action bar."));const Kh={Visible:new ce("codeActionMenuVisible",!1,m("codeActionMenuVisible","Whether the action widget list is visible"))},gf=it("actionWidgetService");let qh=class extends U{get isVisible(){return Kh.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new ci)}show(e,t,n,i,r,s,a){const l=Kh.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(GA,e,t,n,i);this._contextViewService.showContextView({getAnchor:()=>r,render:d=>(l.set(!0),this._renderWidget(d,c,a??[])),onHide:d=>{l.reset(),this._onWidgetClosed(d)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var i;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=t,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const s=new Y,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(z(l,re.MOUSE_DOWN,p=>p.stopPropagation()));const c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(z(d,re.POINTER_MOVE,()=>d.remove())),s.add(z(d,re.MOUSE_DOWN,()=>d.remove()));let u=0;if(n.length){const p=this._createActionBar(".action-widget-action-bar",n);p&&(r.appendChild(p.getContainer().parentElement),s.add(p),u=p.getContainer().offsetWidth)}const h=(i=this._list.value)===null||i===void 0?void 0:i.layout(u);r.style.width=`${h}px`;const f=s.add(oa(e));return s.add(f.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;const n=Z(e),i=new qo(n);return i.push(t,{icon:!1,label:!0}),i}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};qh=Khe([D2(0,xl),D2(1,Oe),D2(2,Ae)],qh);dt(gf,qh,1);const sy=1100;Jt(class extends To{constructor(){super({id:"hideCodeActionWidget",title:{value:m("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:Kh.Visible,keybinding:{weight:sy,primary:9,secondary:[1033]}})}run(o){o.get(gf).hide()}});Jt(class extends To{constructor(){super({id:"selectPrevCodeAction",title:{value:m("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:Kh.Visible,keybinding:{weight:sy,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(o){const e=o.get(gf);e instanceof qh&&e.focusPrevious()}});Jt(class extends To{constructor(){super({id:"selectNextCodeAction",title:{value:m("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:Kh.Visible,keybinding:{weight:sy,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(o){const e=o.get(gf);e instanceof qh&&e.focusNext()}});Jt(class extends To{constructor(){super({id:ZV,title:{value:m("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:Kh.Visible,keybinding:{weight:sy,primary:3,secondary:[2137]}})}run(o){const e=o.get(gf);e instanceof qh&&e.acceptSelected()}});Jt(class extends To{constructor(){super({id:eW,title:{value:m("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:Kh.Visible,keybinding:{weight:sy,primary:2051}})}run(o){const e=o.get(gf);e instanceof qh&&e.acceptSelected(!0)}});const nW=new ce("supportedCodeAction",""),P3="_typescript.applyFixAllCodeAction";class qhe extends U{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new Ss),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>PN(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Jr.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(e.type===1)return t;const n=this._editor.getOption(64).enabled;if(n!==as.Off){{if(n===as.On)return t;if(n===as.OnCode){if(!t.isEmpty())return t;const r=this._editor.getModel(),{lineNumber:s,column:a}=t.getPosition(),l=r.getLineContent(s);if(l.length===0)return;if(a===1){if(/\s/.test(l[0]))return}else if(a===r.getLineMaxColumn(s)){if(/\s/.test(l[l.length-1]))return}else if(/\s/.test(l[a-2])&&/\s/.test(l[a-1]))return}}return t}}}var Zu;(function(o){o.Empty={type:0};class e{constructor(n,i,r){this.trigger=n,this.position=i,this._cancellablePromise=r,this.type=1,this.actions=r.catch(s=>{if(fa(s))return iW;throw s})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(Zu||(Zu={}));const iW=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class $he extends U{constructor(e,t,n,i,r,s){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._configurationService=s,this._codeActionOracle=this._register(new ci),this._state=Zu.Empty,this._onDidChangeState=this._register(new P),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=nW.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(64)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Zu.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Zu.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(n=>{var i;return(i=n.providedCodeActionKinds)!==null&&i!==void 0?i:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new qhe(this._editor,this._markerService,n=>{var i;if(!n){this.setState(Zu.Empty);return}const r=n.selection.getStartPosition(),s=ei(async a=>{var l,c,d,u,h,f,p,g,_,y;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===Jr.QuickFix||!((c=(l=n.trigger.filter)===null||l===void 0?void 0:l.include)===null||c===void 0)&&c.contains(Me.QuickFix))){const b=await W_(this._registry,e,n.selection,n.trigger,hc.None,a),v=[...b.allActions];if(a.isCancellationRequested)return iW;const S=(d=b.validActions)===null||d===void 0?void 0:d.some(E=>E.action.kind?Me.QuickFix.contains(new Me(E.action.kind)):!1),w=this._markerService.read({resource:e.uri});if(S){for(const E of b.validActions)!((h=(u=E.action.command)===null||u===void 0?void 0:u.arguments)===null||h===void 0)&&h.some(x=>typeof x=="string"&&x.includes(P3))&&(E.action.diagnostics=[...w.filter(x=>x.relatedInformation)]);return{validActions:b.validActions,allActions:v,documentation:b.documentation,hasAutoFix:b.hasAutoFix,hasAIFix:b.hasAIFix,allAIFixes:b.allAIFixes,dispose:()=>{b.dispose()}}}else if(!S&&w.length>0){const E=n.selection.getPosition();let x=E,k=Number.MAX_VALUE;const D=[...b.validActions];for(const O of w){const M=O.endColumn,V=O.endLineNumber,$=O.startLineNumber;if(V===E.lineNumber||$===E.lineNumber){x=new F(V,M);const Q={type:n.trigger.type,triggerAction:n.trigger.triggerAction,filter:{include:!((f=n.trigger.filter)===null||f===void 0)&&f.include?(p=n.trigger.filter)===null||p===void 0?void 0:p.include:Me.QuickFix},autoApply:n.trigger.autoApply,context:{notAvailableMessage:((g=n.trigger.context)===null||g===void 0?void 0:g.notAvailableMessage)||"",position:x}},ge=new _e(x.lineNumber,x.column,x.lineNumber,x.column),we=await W_(this._registry,e,ge,Q,hc.None,a);if(we.validActions.length!==0){for(const Ie of we.validActions)!((y=(_=Ie.action.command)===null||_===void 0?void 0:_.arguments)===null||y===void 0)&&y.some(me=>typeof me=="string"&&me.includes(P3))&&(Ie.action.diagnostics=[...w.filter(me=>me.relatedInformation)]);b.allActions.length===0&&v.push(...we.allActions),Math.abs(E.column-M)<k?D.unshift(...we.validActions):D.push(...we.validActions)}k=Math.abs(E.column-M)}}const B=D.filter((O,M,V)=>V.findIndex($=>$.action.title===O.action.title)===M);return B.sort((O,M)=>O.action.isPreferred&&!M.action.isPreferred?-1:!O.action.isPreferred&&M.action.isPreferred||O.action.isAI&&!M.action.isAI?1:!O.action.isAI&&M.action.isAI?-1:0),{validActions:B,allActions:v,documentation:b.documentation,hasAutoFix:b.hasAutoFix,hasAIFix:b.hasAIFix,allAIFixes:b.allAIFixes,dispose:()=>{b.dispose()}}}}return W_(this._registry,e,n.selection,n.trigger,hc.None,a)});n.trigger.type===1&&((i=this._progressService)===null||i===void 0||i.showWhile(s,250)),this.setState(new Zu.Triggered(n.trigger,r,s))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Jr.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var Jhe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Rl=function(o,e){return function(t,n){e(t,n,o)}},s_;const Xhe="quickfix-edit-highlight";let Jd=s_=class extends U{static get(e){return e.getContribution(s_.ID)}constructor(e,t,n,i,r,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new ci),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new $he(this._editor,r.codeActionProvider,t,n,s,l)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new du(()=>{const u=this._editor.getContribution(jh.ID);return u&&this._register(u.onClick(h=>this.showCodeActionsFromLightbulb(h.actions,h))),u}),this._resolver=i.createInstance(dw),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&e.validActions.length===1){const n=e.validActions[0],i=n.action.command;i&&i.id==="inlineChat.start"&&i.arguments&&i.arguments.length>=1&&(i.arguments[0]={...i.arguments[0],autoSend:!1}),await this._applyCodeAction(n,!1,!1,jp.FromAILightbulb);return}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,i){var r;if(!this._editor.hasModel())return;(r=ur.get(this._editor))===null||r===void 0||r.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:i,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,n,i){try{await this._instantiationService.invokeFunction(Phe,e,i,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Jr.QuickFix,filter:{}})}}async update(e){var t,n,i,r,s,a,l;if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let c;try{c=await e.actions}catch(d){We(d);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(c,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const u=this.tryGetValidActionToApply(e.trigger,c);if(u){try{(r=this._lightBulbWidget.value)===null||r===void 0||r.hide(),await this._applyCodeAction(u,!1,!1,jp.FromCodeActions)}finally{c.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(h&&h.action.disabled){(s=ur.get(this._editor))===null||s===void 0||s.showMessage(h.action.disabled,e.trigger.context.position),c.dispose();return}}}const d=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!c.allActions.length||!d&&!c.validActions.length)){(l=ur.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this.showCodeActionList(c,this.toCoords(e.position),{includeDisabledActions:d,fromLightbulb:!1})}else this._actionWidgetService.isVisible?c.dispose():this._activeCodeActions.value=c}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}async showCodeActionList(e,t,n){const i=this._editor.createDecorationsCollection(),r=this._editor.getDomNode();if(!r)return;const s=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!s.length)return;const a=F.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(c,d)=>{this._applyCodeAction(c,!0,!!d,jp.FromCodeActions),this._actionWidgetService.hide(),i.clear()},onHide:()=>{var c;(c=this._editor)===null||c===void 0||c.focus(),i.clear()},onHover:async(c,d)=>{var u;if(!d.isCancellationRequested)return{canPreview:!!(!((u=c.action.edit)===null||u===void 0)&&u.edits.length)}},onFocus:c=>{var d,u;if(c&&c.action){const h=c.action.ranges,f=c.action.diagnostics;if(i.clear(),h&&h.length>0){const p=h.map(g=>({range:g,options:s_.DECORATION}));i.set(p)}else if(f&&f.length>0){const p=f.map(_=>({range:_,options:s_.DECORATION}));i.set(p);const g=f[0];if(g.startLineNumber&&g.startColumn){const _=(u=(d=this._editor.getModel())===null||d===void 0?void 0:d.getWordAtPosition({lineNumber:g.startLineNumber,column:g.startColumn}))===null||u===void 0?void 0:u.word;yc(m("editingNewSelection","Context: {0} at line {1} and column {2}.",_,g.startLineNumber,g.startColumn))}}}else i.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Uhe(s,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,r,this._getActionBarActions(e,t,n))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=Fn(this._editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height;return{x:i,y:r}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const i=e.documentation.map(r=>{var s;return{id:r.id,label:r.title,tooltip:(s=r.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(r.id,...(a=r.arguments)!==null&&a!==void 0?a:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&i.push(this._showDisabled?{id:"hideMoreActions",label:m("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:m("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),i}};Jd.ID="editor.contrib.codeActionController";Jd.DECORATION=He.register({description:"quickfix-highlight",className:Xhe});Jd=s_=Jhe([Rl(1,Tl),Rl(2,Oe),Rl(3,Ae),Rl(4,pe),Rl(5,pu),Rl(6,hn),Rl(7,rt),Rl(8,gf),Rl(9,Ae)],Jd);$o((o,e)=>{((i,r)=>{r&&e.addRule(`.monaco-editor ${i} { background-color: ${r}; }`)})(".quickfix-edit-highlight",o.getColor(el));const n=o.getColor(rd);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${ea(o.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function ay(o){return J.regex(nW.keys()[0],new RegExp("(\\s|^)"+vo(o.value)+"\\b"))}const d6={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:m("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:m("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[m("args.schema.apply.first","Always apply the first returned code action."),m("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),m("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:m("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function _f(o,e,t,n,i=Jr.Default){if(o.hasModel()){const r=Jd.get(o);r==null||r.manualTriggerAtCurrentPosition(e,i,t,n)}}class Yhe extends fe{constructor(){super({id:a6,label:m("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:J.and(A.writable,A.hasCodeActionsProvider),kbOpts:{kbExpr:A.textInputFocus,primary:2137,weight:100}})}run(e,t){return _f(t,m("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Jr.QuickFix)}}class Qhe extends di{constructor(){super({id:qV,precondition:J.and(A.writable,A.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:d6}]}})}runEditorCommand(e,t,n){const i=Ka.fromUser(n,{kind:Me.Empty,apply:"ifSingle"});return _f(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?m("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):m("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):i.preferred?m("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):m("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class Zhe extends fe{constructor(){super({id:JV,label:m("refactor.label","Refactor..."),alias:"Refactor...",precondition:J.and(A.writable,A.hasCodeActionsProvider),kbOpts:{kbExpr:A.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:J.and(A.writable,ay(Me.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:d6}]}})}run(e,t,n){const i=Ka.fromUser(n,{kind:Me.Refactor,apply:"never"});return _f(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?m("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):m("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):i.preferred?m("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):m("editor.action.refactor.noneMessage","No refactorings available"),{include:Me.Refactor.contains(i.kind)?i.kind:Me.None,onlyIncludePreferredActions:i.preferred},i.apply,Jr.Refactor)}}class efe extends fe{constructor(){super({id:XV,label:m("source.label","Source Action..."),alias:"Source Action...",precondition:J.and(A.writable,A.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:J.and(A.writable,ay(Me.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:d6}]}})}run(e,t,n){const i=Ka.fromUser(n,{kind:Me.Source,apply:"never"});return _f(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?m("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):m("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):i.preferred?m("editor.action.source.noneMessage.preferred","No preferred source actions available"):m("editor.action.source.noneMessage","No source actions available"),{include:Me.Source.contains(i.kind)?i.kind:Me.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,Jr.SourceAction)}}class tfe extends fe{constructor(){super({id:l6,label:m("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:J.and(A.writable,ay(Me.SourceOrganizeImports)),kbOpts:{kbExpr:A.textInputFocus,primary:1581,weight:100}})}run(e,t){return _f(t,m("editor.action.organize.noneMessage","No organize imports action available"),{include:Me.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Jr.OrganizeImports)}}class nfe extends fe{constructor(){super({id:c6,label:m("fixAll.label","Fix All"),alias:"Fix All",precondition:J.and(A.writable,ay(Me.SourceFixAll))})}run(e,t){return _f(t,m("fixAll.noneMessage","No fix all action available"),{include:Me.SourceFixAll,includeSourceActions:!0},"ifSingle",Jr.FixAll)}}class ife extends fe{constructor(){super({id:$V,label:m("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:J.and(A.writable,ay(Me.QuickFix)),kbOpts:{kbExpr:A.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return _f(t,m("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Me.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Jr.AutoFix)}}_t(Jd.ID,Jd,3);_t(jh.ID,jh,4);te(Yhe);te(Zhe);te(efe);te(tfe);te(ife);te(nfe);ae(new Qhe);rn.as(ga.Configuration).registerConfiguration({...kC,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:m("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});rn.as(ga.Configuration).registerConfiguration({...kC,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:m("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});class zA{constructor(){this.lenses=[],this._disposables=new Y}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}async function rW(o,e,t){const n=o.ordered(e),i=new Map,r=new zA,s=n.map(async(a,l)=>{i.set(a,l);try{const c=await Promise.resolve(a.provideCodeLenses(e,t));c&&r.add(c,a)}catch(c){Bn(c)}});return await Promise.all(s),r.lenses=r.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:i.get(a.provider)<i.get(l.provider)?-1:i.get(a.provider)>i.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),r}ct.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,n]=e;Lt(Te.isUri(t)),Lt(typeof n=="number"||!n);const{codeLensProvider:i}=o.get(pe),r=o.get(Zt).getModel(t);if(!r)throw Uo();const s=[],a=new Y;return rW(i,r,nt.None).then(l=>{a.add(l);const c=[];for(const d of l.lenses)n==null||d.symbol.command?s.push(d.symbol):n-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(r,d.symbol,nt.None)).then(u=>s.push(u||d.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})});var rfe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ofe=function(o,e){return function(t,n){e(t,n,o)}};const oW=it("ICodeLensCache");class F3{constructor(e,t){this.lineCount=e,this.data=t}}let jA=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new uu(20,.75);const t="codelens/cache";Gg(At,()=>e.remove(t,1));const n="codelens/cache2",i=e.get(n,1,"{}");this._deserialize(i),le.once(e.onWillSaveState)(r=>{r.reason===B1.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)===null||a===void 0?void 0:a.title}}}),i=new zA;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new F3(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const r of n.data.lenses)i.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const i=t[n],r=[];for(const a of i.lines)r.push({range:new T(a,1,a,11)});const s=new zA;s.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new F3(i.lineCount,s))}}catch{}}};jA=rfe([ofe(0,Es)],jA);dt(oW,jA,1);class sfe{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class n0{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${n0._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let i=!1;for(let r=0;r<e.length;r++){const s=e[r];if(s&&(i=!0,s.command)){const a=Sd(s.command.title.trim());if(s.command.id){const l=`c${n0._idPool++}`;n.push(Z("a",{id:l,title:s.command.tooltip,role:"button"},...a)),this._commands.set(l,s.command)}else n.push(Z("span",{title:s.command.tooltip},...a));r+1<e.length&&n.push(Z("span",void 0," | "))}}i?(Ii(this._domNode,...n),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):Ii(this._domNode,Z("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}n0._idPool=0;class N2{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){const t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let n=0,i=t.length;n<i;n++)this._addDecorationsCallbacks[n](t[n])}}const B3=He.register({collapseOnReplaceEdit:!0,description:"codelens"});class V3{constructor(e,t,n,i,r,s){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a;const l=[];this._data.forEach((c,d)=>{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:B3},u=>this._decorationIds[d]=u),a?a=T.plusRange(a,c.symbol.range):a=T.lift(c.symbol.range)}),this._viewZone=new sfe(a.startLineNumber-1,r,s),this._viewZoneId=i.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new n0(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!!(n&&T.isEmpty(i.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,i)=>{t.addDecoration({range:n.symbol.range,options:B3},r=>this._decorationIds[i]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const n=e.getDecorationRange(this._decorationIds[t]);n&&(this._data[t].symbol.range=n)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const n=e[t];if(n){const{symbol:i}=this._data[t];i.command=n.command||i.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}var afe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Rg=function(o,e){return function(t,n){e(t,n,o)}};let Im=class{constructor(e,t,n,i,r,s){this._editor=e,this._languageFeaturesService=t,this._commandService=i,this._notificationService=r,this._codeLensCache=s,this._disposables=new Y,this._localToDispose=new Y,this._lenses=[],this._oldCodeLensModels=new Y,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Dt(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(18),i=this._editor.getOption(50),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",i.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",kr.fontFamily)),this._editor.changeViewZones(s=>{for(const a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&Bd(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const i of this._languageFeaturesService.codeLensProvider.all(e))if(typeof i.onDidChange=="function"){const r=i.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new Dt(()=>{var i;const r=Date.now();(i=this._getCodeLensModelPromise)===null||i===void 0||i.cancel(),this._getCodeLensModelPromise=ei(s=>rW(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);const a=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},We)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(Le(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var i;this._editor.changeDecorations(r=>{this._editor.changeViewZones(s=>{const a=[];let l=-1;this._lenses.forEach(d=>{!d.isValid()||l===d.getLineNumber()?a.push(d):(d.update(s),l=d.getLineNumber())});const c=new N2;a.forEach(d=>{d.dispose(c,s),this._lenses.splice(this._lenses.indexOf(d),1)}),c.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Le(()=>{if(this._editor.getModel()){const i=ua.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(r,s)})}),i.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(i=>{if(i.target.type!==9)return;let r=i.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const s of this._lenses){const a=s.getCommand(r);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new N2;for(const i of this._lenses)i.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let i;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(i&&i[i.length-1].symbol.range.startLineNumber===l?i.push(a):(i=[a],n.push(i)))}if(!n.length&&!this._lenses.length)return;const r=ua.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new N2;let d=0,u=0;for(;u<n.length&&d<this._lenses.length;){const h=n[u][0].symbol.range.startLineNumber,f=this._lenses[d].getLineNumber();f<h?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):f===h?(this._lenses[d].updateCodeLensSymbols(n[u],c),u++,d++):(this._lenses.splice(d,0,new V3(n[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,u++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;u<n.length;)this._lenses.push(new V3(n[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],i=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(n.push(l),i.push(a))}),n.length===0)return;const r=Date.now(),s=ei(a=>{const l=n.map((c,d)=>{const u=new Array(c.length),h=c.map((f,p)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(g=>{u[p]=g},Bn):(u[p]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!i[d].isDisposed()&&i[d].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{We(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel}};Im.ID="css.editor.codeLens";Im=afe([Rg(1,pe),Rg(2,Jo),Rg(3,hn),Rg(4,Rn),Rg(5,oW)],Im);_t(Im.ID,Im,1);te(class extends fe{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:A.hasCodeLensProvider,label:m("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const n=e.get(ya),i=e.get(hn),r=e.get(Rn),s=t.getSelection().positionLineNumber,a=t.getContribution(Im.ID);if(!a)return;const l=await a.getModel();if(!l)return;const c=[];for(const h of l.lenses)h.symbol.command&&h.symbol.range.startLineNumber===s&&c.push({label:h.symbol.command.title,command:h.symbol.command});if(c.length===0)return;const d=await n.pick(c,{canPickMany:!1,placeHolder:m("placeHolder","Select a command")});if(!d)return;let u=d.command;if(l.isDisposed){const h=await a.getModel(),f=h==null?void 0:h.lenses.find(p=>{var g;return p.symbol.range.startLineNumber===s&&((g=p.symbol.command)===null||g===void 0?void 0:g.title)===u.title});if(!f||!f.symbol.command)return;u=f.symbol.command}try{await i.executeCommand(u.id,...u.arguments||[])}catch(h){r.error(h)}}});var lfe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},R2=function(o,e){return function(t,n){e(t,n,o)}};class u6{constructor(e,t){this._editorWorkerClient=new uN(e,!1,"editorWorkerService",t)}async provideDocumentColors(e,t){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,n){const i=t.range,r=t.color,s=r.alpha,a=new H(new ut(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),s)),l=s?H.Format.CSS.formatRGB(a):H.Format.CSS.formatRGBA(a),c=s?H.Format.CSS.formatHSL(a):H.Format.CSS.formatHSLA(a),d=s?H.Format.CSS.formatHex(a):H.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:i,text:l}}),u.push({label:c,textEdit:{range:i,text:c}}),u.push({label:d,textEdit:{range:i,text:d}}),u}}let KA=class extends U{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new u6(e,t)))}};KA=lfe([R2(0,Zt),R2(1,Ft),R2(2,pe)],KA);ey(KA);async function sW(o,e,t,n=!0){return h6(new cfe,o,e,t,n)}function aW(o,e,t,n){return Promise.resolve(t.provideColorPresentations(o,e,n))}class cfe{constructor(){}async compute(e,t,n,i){const r=await e.provideDocumentColors(t,n);if(Array.isArray(r))for(const s of r)i.push({colorInfo:s,provider:e});return Array.isArray(r)}}class dfe{constructor(){}async compute(e,t,n,i){const r=await e.provideDocumentColors(t,n);if(Array.isArray(r))for(const s of r)i.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(r)}}class ufe{constructor(e){this.colorInfo=e}async compute(e,t,n,i){const r=await e.provideColorPresentations(t,this.colorInfo,nt.None);return Array.isArray(r)&&i.push(...r),Array.isArray(r)}}async function h6(o,e,t,n,i){let r=!1,s;const a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){const d=l[c];if(d instanceof u6)s=d;else try{await o.compute(d,t,n,a)&&(r=!0)}catch(u){Bn(u)}}return r?a:s&&i?(await o.compute(s,t,n,a),a):[]}function lW(o,e){const{colorProvider:t}=o.get(pe),n=o.get(Zt).getModel(e);if(!n)throw Uo();const i=o.get(rt).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:i}}ct.registerCommand("_executeDocumentColorProvider",function(o,...e){const[t]=e;if(!(t instanceof Te))throw Uo();const{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:r}=lW(o,t);return h6(new dfe,i,n,nt.None,r)});ct.registerCommand("_executeColorPresentationProvider",function(o,...e){const[t,n]=e,{uri:i,range:r}=n;if(!(i instanceof Te)||!Array.isArray(t)||t.length!==4||!T.isIRange(r))throw Uo();const{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=lW(o,i),[c,d,u,h]=t;return h6(new ufe({range:r,color:{red:c,green:d,blue:u,alpha:h}}),a,s,nt.None,l)});var hfe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},M2=function(o,e){return function(t,n){e(t,n,o)}},qA;const cW=Object.create({});let Xd=qA=class extends U{constructor(e,t,n,i){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new Y),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new P0(this._editor),this._decoratorLimitReporter=new ffe,this._colorDecorationClassRefs=this._register(new Y),this._debounceInformation=i.for(n.colorProvider,"Document Colors",{min:qA.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(r=>{const s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const a=s!==this._isColorDecoratorsEnabled||r.hasChanged(21),l=r.hasChanged(145);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const i=n.colorDecorators;if(i&&i.enable!==void 0&&!i.enable)return i.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Ss,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=ei(async e=>{const t=this._editor.getModel();if(!t)return[];const n=new Vi(!1),i=await sW(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),i});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){We(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:He.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,r)=>this._colorDatas.set(i,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(21);for(let r=0;r<e.length&&t.length<n;r++){const{red:s,green:a,blue:l,alpha:c}=e[r].colorInfo.color,d=new ut(Math.round(s*255),Math.round(a*255),Math.round(l*255),c),u=`rgba(${d.r}, ${d.g}, ${d.b}, ${d.a})`,h=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:u}));t.push({range:{startLineNumber:e[r].colorInfo.range.startLineNumber,startColumn:e[r].colorInfo.range.startColumn,endLineNumber:e[r].colorInfo.range.endLineNumber,endColumn:e[r].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:KP,inlineClassName:`${h.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:cW}}})}const i=n<e.length?n:!1;this._decoratorLimitReporter.update(e.length,i),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const t=this._editor.getModel();if(!t)return null;const n=t.getDecorationsInRange(T.fromPositions(e,e)).filter(i=>this._colorDatas.has(i.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Xd.ID="editor.contrib.colorDetector";Xd.RECOMPUTE_TIME=1e3;Xd=qA=hfe([M2(1,rt),M2(2,pe),M2(3,Jo)],Xd);class ffe{constructor(){this._onDidChange=new P,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}_t(Xd.ID,Xd,1);class pfe{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new P,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new P,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new P,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let i=0;i<this.colorPresentations.length;i++)if(t.toLowerCase()===this.colorPresentations[i].label){n=i;break}if(n===-1){const i=t.split("(")[0].toLowerCase();for(let r=0;r<this.colorPresentations.length;r++)if(this.colorPresentations[r].label.toLowerCase().startsWith(i)){n=r;break}}n!==-1&&n!==this.presentationIndex&&(this.presentationIndex=n,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}const po=Z;class mfe extends U{constructor(e,t,n,i=!1){super(),this.model=t,this.showingStandaloneColorPicker=i,this._closeButton=null,this._domNode=po(".colorpicker-header"),X(e,this._domNode),this._pickedColorNode=X(this._domNode,po(".picked-color")),X(this._pickedColorNode,po("span.codicon.codicon-color-mode")),this._pickedColorPresentation=X(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const r=m("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",r),this._originalColorNode=X(this._domNode,po(".original-color")),this._originalColorNode.style.backgroundColor=H.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(eS)||H.white,this._register(n.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(eS)||H.white})),this._register(z(this._pickedColorNode,re.CLICK,()=>this.model.selectNextColorPresentation())),this._register(z(this._originalColorNode,re.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=H.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new gfe(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=H.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class gfe extends U{constructor(e){super(),this._onClicked=this._register(new P),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),X(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),X(this._button,t),X(t,po(".button"+ke.asCSSSelector(Tn("color-picker-close",se.close,m("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(z(this._button,re.CLICK,()=>{this._onClicked.fire()}))}}class _fe extends U{constructor(e,t,n,i=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=po(".colorpicker-body"),X(e,this._domNode),this._saturationBox=new yfe(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new bfe(this._domNode,this.model,i),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new vfe(this._domNode,this.model,i),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),i&&(this._insertButton=this._register(new Sfe(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new H(new qa(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new H(new qa(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new H(new qa(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class yfe extends U{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new P,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new P,this.onColorFlushed=this._onColorFlushed.event,this._domNode=po(".saturation-wrap"),X(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",X(this._domNode,this._canvas),this.selection=po(".saturation-selection"),X(this._domNode,this.selection),this.layout(),this._register(z(this._domNode,re.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new $m);const t=Fn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>this.onDidChangePosition(i.pageX-t.left,i.pageY-t.top),()=>null);const n=z(e.target.ownerDocument,re.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new H(new qa(e.h,1,1,1)),n=this._canvas.getContext("2d"),i=n.createLinearGradient(0,0,this._canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=H.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class dW extends U{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new P,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new P,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=X(e,po(".standalone-strip")),this.overlay=X(this.domNode,po(".standalone-overlay"))):(this.domNode=X(e,po(".strip")),this.overlay=X(this.domNode,po(".overlay"))),this.slider=X(this.domNode,po(".slider")),this.slider.style.top="0px",this._register(z(this.domNode,re.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new $m),n=Fn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const i=z(e.target.ownerDocument,re.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class bfe extends dW{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:n,b:i}=e.rgba,r=new H(new ut(t,n,i,1)),s=new H(new ut(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class vfe extends dW{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Sfe extends U{constructor(e){super(),this._onClicked=this._register(new P),this.onClicked=this._onClicked.event,this._button=X(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(z(this._button,re.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}class wfe extends Lo{constructor(e,t,n,i,r=!1){super(),this.model=t,this.pixelRatio=n,this._register(n1.onDidChange(()=>this.layout()));const s=po(".colorpicker-widget");e.appendChild(s),this.header=this._register(new mfe(s,this.model,i,r)),this.body=this._register(new _fe(s,this.model,this.pixelRatio,r))}layout(){this.body.layout()}}var uW=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hW=function(o,e){return function(t,n){e(t,n,o)}};class Cfe{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let uw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return On.fromPromise(this._computeAsync(e,t,n))}async _computeAsync(e,t,n){if(!this._editor.hasModel())return[];const i=Xd.get(this._editor);if(!i)return[];for(const r of t){if(!i.isColorDecoration(r))continue;const s=i.getColorData(r.range.getStartPosition());if(s)return[await fW(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]}renderHoverParts(e,t){return pW(this,this._editor,this._themeService,t,e)}};uw=uW([hW(1,ti)],uw);class Efe{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i}}let i0=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,n){if(!this._editor.hasModel()||!Xd.get(this._editor))return null;const r=await sW(n,this._editor.getModel(),nt.None);let s=null,a=null;for(const u of r){const h=u.colorInfo;T.containsRange(h.range,e.range)&&(s=h,a=u.provider)}const l=s??e,c=a??t,d=!!s;return{colorHover:await fW(this,this._editor.getModel(),l,c),foundInEditor:d}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let n=new T(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await yv(this._editor.getModel(),t,this._color,n,e),n=mW(this._editor,n,t))}renderHoverParts(e,t){return pW(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};i0=uW([hW(1,ti)],i0);async function fW(o,e,t,n){const i=e.getValueInRange(t.range),{red:r,green:s,blue:a,alpha:l}=t.color,c=new ut(Math.round(r*255),Math.round(s*255),Math.round(a*255),l),d=new H(c),u=await aW(e,t,n,nt.None),h=new pfe(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,i),o instanceof uw?new Cfe(o,T.lift(t.range),h,n):new Efe(o,T.lift(t.range),h,n)}function pW(o,e,t,n,i){if(n.length===0||!e.hasModel())return U.None;if(i.setMinimumDimensions){const h=e.getOption(66)+8;i.setMinimumDimensions(new pt(302,h))}const r=new Y,s=n[0],a=e.getModel(),l=s.model,c=r.add(new wfe(i.fragment,l,e.getOption(141),t,o instanceof i0));i.setColorPicker(c);let d=!1,u=new T(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(o instanceof i0){const h=n[0].model.color;o.color=h,yv(a,l,h,u,s),r.add(l.onColorFlushed(f=>{o.color=f}))}else r.add(l.onColorFlushed(async h=>{await yv(a,l,h,u,s),d=!0,u=mW(e,u,l)}));return r.add(l.onDidChangeColor(h=>{yv(a,l,h,u,s)})),r.add(e.onDidChangeModelContent(h=>{d?d=!1:(i.hide(),e.focus())})),r}function mW(o,e,t){var n,i;const r=[],s=(n=t.presentation.textEdit)!==null&&n!==void 0?n:{range:e,text:t.presentation.label,forceMoveMarkers:!1};r.push(s),t.presentation.additionalTextEdits&&r.push(...t.presentation.additionalTextEdits);const a=T.lift(s.range),l=o.getModel()._setTrackedRange(null,a,3);return o.executeEdits("colorpicker",r),o.pushUndoStop(),(i=o.getModel()._getTrackedRange(l))!==null&&i!==void 0?i:a}async function yv(o,e,t,n,i){const r=await aW(o,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},i.provider,nt.None);e.colorPresentations=r||[]}function $A(o,e){return!!o[e]}class O2{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=$A(e.event,t.triggerModifier),this.hasSideBySideModifier=$A(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class W3{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=$A(e,t.triggerModifier)}}class gb{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function U3(o){return o==="altKey"?at?new gb(57,"metaKey",6,"altKey"):new gb(5,"ctrlKey",6,"altKey"):at?new gb(6,"altKey",57,"metaKey"):new gb(6,"altKey",5,"ctrlKey")}class lE extends U{constructor(e,t){var n;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new P),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new P),this.onExecute=this._onExecute.event,this._onCancel=this._register(new P),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&n!==void 0?n:i=>i.target.position?i.target.position.lineNumber:0,this._opts=U3(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(77)){const r=U3(this._editor.getOption(77));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new O2(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new O2(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new O2(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new W3(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new W3(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var xfe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ml=function(o,e){return function(t,n){e(t,n,o)}};let Yd=class extends gm{constructor(e,t,n,i,r,s,a,l,c,d,u,h,f){super(e,{...i.getRawOptions(),overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()},n,r,s,a,l,c,d,u,h,f),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(p=>this._onParentConfigurationChanged(p)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){Nw(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Yd=xfe([Ml(4,Ae),Ml(5,gt),Ml(6,hn),Ml(7,Oe),Ml(8,ti),Ml(9,Rn),Ml(10,ws),Ml(11,Ft),Ml(12,pe)],Yd);const H3=new H(new ut(0,122,204)),Tfe={showArrow:!0,showFrame:!0,className:"",frameColor:H3,arrowColor:H3,keepEditorSelection:!1},Lfe="vs.editor.contrib.zoneWidget";class kfe{constructor(e,t,n,i,r,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=r,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class Afe{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class cE{constructor(e){this._editor=e,this._ruleName=cE._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),mL(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){mL(this._ruleName),Gv(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:T.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}cE._IdGenerator=new dR(".arrow-decoration-");class Ife{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new Y,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=Ul(t),Nw(this.options,Tfe,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const i=this._getWidth(n);this.domNode.style.width=i+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(i)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new cE(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const i=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(i))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=T.isIRange(e)?T.lift(e):T.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:He.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const s=document.createElement("div");s.style.overflow="hidden";const a=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new kfe(s,n.lineNumber,n.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new Afe(Lfe+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const d=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,r),this.options.keepEditorSelection||this.editor.setSelection(e);const u=this.editor.getModel();if(u){const h=u.validateRange(new T(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===u.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Ri(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(66),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var gW=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_W=function(o,e){return function(t,n){e(t,n,o)}};const yW=it("IPeekViewService");dt(yW,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const i=this._widgets.get(o);i&&i.widget===e&&(i.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(n)})}},1);var Dr;(function(o){o.inPeekEditor=new ce("inReferenceSearchEditor",!0,m("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(Dr||(Dr={}));let r0=class{constructor(e,t){e instanceof Yd&&Dr.inPeekEditor.bindTo(t)}dispose(){}};r0.ID="editor.contrib.referenceController";r0=gW([_W(1,Oe)],r0);_t(r0.ID,r0,0);function Dfe(o){const e=o.get(gt).getFocusedCodeEditor();return e instanceof Yd?e.getParentEditor():e}const Nfe={headerBackgroundColor:H.white,primaryHeadingColor:H.fromHex("#333333"),secondaryHeadingColor:H.fromHex("#6c6c6cb3")};let hw=class extends Ife{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new P,this.onDidClose=this._onDidClose.event,Nw(this.options,Nfe,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Z(".head"),this._bodyElement=Z(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=Z(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),xn(this._titleElement,"click",r=>this._onTitleClick(r))),X(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Z("span.filename"),this._secondaryHeading=Z("span.dirname"),this._metaHeading=Z("span.meta"),X(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=Z(".peekview-actions");X(this._headElement,n);const i=this._getActionBarOptions();this._actionbarWidget=new qo(n,i),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Gr("peekview.close",m("label.close","Close"),ke.asClassName(se.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:boe.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:ki(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Vr(this._metaHeading)):ir(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(66)*1.2),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};hw=gW([_W(2,Ae)],hw);const Rfe=I("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:H.black,hcLight:H.white},m("peekViewTitleBackground","Background color of the peek view title area.")),bW=I("peekViewTitleLabel.foreground",{dark:H.white,light:H.black,hcDark:H.white,hcLight:hs},m("peekViewTitleForeground","Color of the peek view title.")),vW=I("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},m("peekViewTitleInfoForeground","Color of the peek view title info.")),Mfe=I("peekView.border",{dark:Lr,light:Lr,hcDark:ot,hcLight:ot},m("peekViewBorder","Color of the peek view borders and arrow.")),Ofe=I("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:H.black,hcLight:H.white},m("peekViewResultsBackground","Background color of the peek view result list."));I("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:H.white,hcLight:hs},m("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));I("peekViewResult.fileForeground",{dark:H.white,light:"#1E1E1E",hcDark:H.white,hcLight:hs},m("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));I("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},m("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));I("peekViewResult.selectionForeground",{dark:H.white,light:"#6C6C6C",hcDark:H.white,hcLight:hs},m("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const ud=I("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:H.black,hcLight:H.white},m("peekViewEditorBackground","Background color of the peek view editor."));I("peekViewEditorGutter.background",{dark:ud,light:ud,hcDark:ud,hcLight:ud},m("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));I("peekViewEditorStickyScroll.background",{dark:ud,light:ud,hcDark:ud,hcLight:ud},m("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));I("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},m("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));I("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},m("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));I("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:qt,hcLight:qt},m("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));class Qd{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=gk.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?m({},"{0} in {1} on line {2} at column {3}",t.value,Ko(this.uri),this.range.startLineNumber,this.range.startColumn):m("aria.oneReference","in {0} on line {1} at column {2}",Ko(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Pfe{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:s,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:i,column:r-t}),c=new T(i,l.startColumn,i,r),d=new T(s,a,s,1073741824),u=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),f=n.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+f,highlight:{start:u.length,end:u.length+h.length}}}}class o0{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new En}dispose(){xt(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?m("aria.fileReferences.1","1 symbol in {0}, full path {1}",Ko(this.uri),this.uri.fsPath):m("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Ko(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=await e.createModelReference(t.uri);this._previews.set(t.uri,new Pfe(n))}catch(n){We(n)}return this}}class jr{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new P,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(jr._compareReferences);let i;for(const r of e)if((!i||!$t.isEqual(i.uri,r.uri,!0))&&(i=new o0(this,r.uri),this.groups.push(i)),i.children.length===0||jr._compareReferences(r,i.children[i.children.length-1])!==0){const s=new Qd(n===r,i,r,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),i.children.push(s)}}dispose(){xt(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new jr(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?m("aria.result.0","No results found"):this.references.length===1?m("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?m("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):m("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:n}=e;let i=n.children.indexOf(e);const r=n.children.length,s=n.parent.groups.length;return s===1||t&&i+1<r||!t&&i>0?(t?i=(i+1)%r:i=(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%s,n.parent.groups[i].children[0]):(i=(i+s-1)%s,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((i,r)=>({idx:r,prefixLen:Th(i.uri.toString(),e.toString()),offsetDist:Math.abs(i.range.startLineNumber-t.lineNumber)*100+Math.abs(i.range.startColumn-t.column)})).sort((i,r)=>i.prefixLen>r.prefixLen?-1:i.prefixLen<r.prefixLen?1:i.offsetDist<r.offsetDist?-1:i.offsetDist>r.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&T.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return $t.compare(e.uri,t.uri)||T.compareRangesUsingStarts(e.range,t.range)}}var dE=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},uE=function(o,e){return function(t,n){e(t,n,o)}},JA;let XA=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof jr||e instanceof o0}getChildren(e){if(e instanceof jr)return e.groups;if(e instanceof o0)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};XA=dE([uE(0,Rr)],XA);class Ffe{getHeight(){return 23}getTemplateId(e){return e instanceof o0?s0.id:ly.id}}let YA=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Qd){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return Ko(e.uri)}};YA=dE([uE(0,It)],YA);class Bfe{getId(e){return e instanceof Qd?e.id:e.uri}}let QA=class extends U{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new jS(n,{supportHighlights:!0})),this.badge=new Qk(X(n,Z(".count")),{},QF),e.appendChild(n)}set(e,t){const n=vC(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const i=e.children.length;this.badge.setCount(i),i>1?this.badge.setTitleFormat(m("referencesCount","{0} references",i)):this.badge.setTitleFormat(m("referenceCount","{0} reference",i))}};QA=dE([uE(1,ym)],QA);let s0=JA=class{constructor(e){this._instantiationService=e,this.templateId=JA.id}renderTemplate(e){return this._instantiationService.createInstance(QA,e)}renderElement(e,t,n){n.set(e.element,j0(e.filterData))}disposeTemplate(e){e.dispose()}};s0.id="FileReferencesRenderer";s0=JA=dE([uE(0,Ae)],s0);class Vfe{constructor(e){this.label=new Ed(e)}set(e,t){var n;const i=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!i||!i.value)this.label.set(`${Ko(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:s}=i;t&&!ta.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,j0(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[s]))}}}class ly{constructor(){this.templateId=ly.id}renderTemplate(e){return new Vfe(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}ly.id="OneReferenceRenderer";class Wfe{getWidgetAriaLabel(){return m("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Ufe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ol=function(o,e){return function(t,n){e(t,n,o)}};class hE{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new Y,this._callOnModelChange=new Y,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i<r;i++){const s=e.children[i];this._decorationIgnoreSet.has(s.id)||s.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:s.range,options:hE.DecorationOptions}),n.push(i))}this._editor.changeDecorations(i=>{const r=i.deltaDecorations([],t);for(let s=0;s<r.length;s++)this._decorations.set(r[s],e.children[n[s]])})}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(const[n,i]of this._decorations){const r=t.getDecorationRange(n);if(!r)continue;let s=!1;if(!T.equalsRange(r,i.range)){if(T.spansMultipleLines(r))s=!0;else{const a=i.range.endColumn-i.range.startColumn,l=r.endColumn-r.startColumn;a!==l&&(s=!0)}s?(this._decorationIgnoreSet.add(i.id),e.push(n)):i.range=r}}for(let n=0,i=e.length;n<i;n++)this._decorations.delete(e[n]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}hE.DecorationOptions=He.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class Hfe{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,n;try{const i=JSON.parse(e);t=i.ratio,n=i.heightInLines}catch{}return{ratio:t||.7,heightInLines:n||18}}}class Gfe extends qk{}let ZA=class extends hw{constructor(e,t,n,i,r,s,a,l,c,d,u,h){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=n,this._textModelResolverService=r,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=d,this._languageService=u,this._languageConfigurationService=h,this._disposeOnNewModel=new Y,this._callOnDispose=new Y,this._onDidSelectReference=new P,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new pt(0,0),this._applyTheme(i.getColorTheme()),this._callOnDispose.add(i.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),xt(this._preview),xt(this._previewNotAvailableMessage),xt(this._tree),xt(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(Mfe)||H.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(Rfe)||H.transparent,primaryHeadingColor:e.getColor(bW),secondaryHeadingColor:e.getColor(vW)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=X(e,Z("div.messages")),ir(this._messageContainer),this._splitView=new nB(e,{orientation:1}),this._previewContainer=X(e,Z("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Yd,this._previewContainer,t,{},this.editor),ir(this._previewContainer),this._previewNotAvailableMessage=new ml(m("missingPreviewMessage","no preview available"),bo,ml.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=X(e,Z("div.ref-tree.inline"));const n={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new Wfe,keyboardNavigationLabelProvider:this._instantiationService.createInstance(YA),identityProvider:new Bfe,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:Ofe}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(xn(this._treeContainer,"keydown",r=>{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Gfe,"ReferencesWidget",this._treeContainer,new Ffe,[this._instantiationService.createInstance(s0),this._instantiationService.createInstance(ly)],this._instantiationService.createInstance(XA),n),this._splitView.addView({onDidChange:le.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},VS.Distribute),this._splitView.addView({onDidChange:le.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},VS.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const i=(r,s)=>{r instanceof Qd&&(s==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:s,source:"tree"}))};this._tree.onDidOpen(r=>{r.sideBySide?i(r.element,"side"):r.editorOptions.pinned?i(r.element,"goto"):i(r.element,"show")}),ir(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new pt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=m("noResults","No results"),Vr(this._messageContainer),Promise.resolve(void 0)):(ir(this._messageContainer),this._decorationsManager=new hE(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:n}=e;if(t.detail!==2)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),Vr(this._treeContainer),Vr(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Qd)return e;if(e instanceof o0&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==je.inMemory?this.setTitle(QZ(e.uri),this._uriLabel.getUriLabel(vC(e.uri))):this.setTitle(m("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const i=await n;if(!this._model){i.dispose();return}xt(this._previewModelReference);const r=i.object;if(r){const s=this._preview.getModel()===r.textEditorModel?0:1,a=T.lift(e.range).collapseToStart();this._previewModelReference=i,this._preview.setModel(r.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),i.dispose()}};ZA=Ufe([Ol(3,ti),Ol(4,Rr),Ol(5,Ae),Ol(6,yW),Ol(7,ym),Ol(8,SC),Ol(9,It),Ol(10,Yt),Ol(11,Ft)],ZA);var zfe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Pf=function(o,e){return function(t,n){e(t,n,o)}},bv;const yf=new ce("referenceSearchVisible",!1,m("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Zd=bv=class{static get(e){return e.getContribution(bv.ID)}constructor(e,t,n,i,r,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new Y,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=yf.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let i;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const r="peekViewLayout",s=Hfe.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(ZA,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(m("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:c,kind:d}=l;if(c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(m("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const d=this._editor.getModel().uri,u=new F(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(i),await this._gotoReference(i,!1),r?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const i=T.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{var s;if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(i),this._widget.focusOnReferenceTree();else{const a=bv.get(r),l=this._model.clone();this.closeWidget(),r.focus(),a==null||a.toggleWidget(i,ei(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},r=>{this._ignoreModelChangeEvent=!1,We(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:r}=e;this._editorService.openCodeEditor({resource:i,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};Zd.ID="editor.contrib.referencesController";Zd=bv=zfe([Pf(2,Oe),Pf(3,gt),Pf(4,Rn),Pf(5,Ae),Pf(6,Es),Pf(7,rt)],Zd);function bf(o,e){const t=Dfe(o);if(!t)return;const n=Zd.get(t);n&&e(n)}Ir.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Gn(2089,60),when:J.or(yf,Dr.inPeekEditor),handler(o){bf(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Ir.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:J.or(yf,Dr.inPeekEditor),handler(o){bf(o,e=>{e.goToNextOrPreviousReference(!0)})}});Ir.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:J.or(yf,Dr.inPeekEditor),handler(o){bf(o,e=>{e.goToNextOrPreviousReference(!1)})}});ct.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ct.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ct.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ct.registerCommand("closeReferenceSearch",o=>bf(o,e=>e.closeWidget()));Ir.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:J.and(Dr.inPeekEditor,J.not("config.editor.stablePeek"))});Ir.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:J.and(yf,J.not("config.editor.stablePeek"))});Ir.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:J.and(yf,bB,DR.negate(),NR.negate()),handler(o){var e;const n=(e=o.get(Yo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Qd&&bf(o,i=>i.revealReference(n[0]))}});Ir.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:J.and(yf,bB,DR.negate(),NR.negate()),handler(o){var e;const n=(e=o.get(Yo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Qd&&bf(o,i=>i.openReference(n[0],!0,!0))}});ct.registerCommand("openReference",o=>{var e;const n=(e=o.get(Yo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Qd&&bf(o,i=>i.openReference(n[0],!1,!0))});var SW=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},a_=function(o,e){return function(t,n){e(t,n,o)}};const f6=new ce("hasSymbols",!1,m("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),fE=it("ISymbolNavigationService");let eI=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=f6.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new tI(this._editorService),i=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const s=this._editorService.getActiveCodeEditor();if(!s)return;const a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,d=!1;for(const u of t.references)if(PN(u.uri,a.uri))c=!0,d=d||T.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=gs(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:T.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?m("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):m("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};eI=SW([a_(0,Oe),a_(1,gt),a_(2,Rn),a_(3,It)],eI);dt(fE,eI,1);ae(new class extends di{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:f6,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(fE).revealNext(e)}});Ir.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:f6,primary:9,handler(o){o.get(fE).reset()}});let tI=class{constructor(e){this._listener=new Map,this._disposables=new Y,this._onDidChange=new P,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),xt(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,gs(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};tI=SW([a_(0,gt)],tI);async function cy(o,e,t,n){const r=t.ordered(o).map(a=>Promise.resolve(n(a,o,e)).then(void 0,l=>{Bn(l)})),s=await Promise.all(r);return na(s.flat())}function pE(o,e,t,n){return cy(e,t,o,(i,r,s)=>i.provideDefinition(r,s,n))}function wW(o,e,t,n){return cy(e,t,o,(i,r,s)=>i.provideDeclaration(r,s,n))}function CW(o,e,t,n){return cy(e,t,o,(i,r,s)=>i.provideImplementation(r,s,n))}function EW(o,e,t,n){return cy(e,t,o,(i,r,s)=>i.provideTypeDefinition(r,s,n))}function mE(o,e,t,n,i){return cy(e,t,o,async(r,s,a)=>{const l=await r.provideReferences(s,a,{includeDeclaration:!0},i);if(!n||!l||l.length!==2)return l;const c=await r.provideReferences(s,a,{includeDeclaration:!1},i);return c&&c.length===1?c:l})}async function dy(o){const e=await o(),t=new jr(e,""),n=t.references.map(i=>i.link);return t.dispose(),n}El("_executeDefinitionProvider",(o,e,t)=>{const n=o.get(pe),i=pE(n.definitionProvider,e,t,nt.None);return dy(()=>i)});El("_executeTypeDefinitionProvider",(o,e,t)=>{const n=o.get(pe),i=EW(n.typeDefinitionProvider,e,t,nt.None);return dy(()=>i)});El("_executeDeclarationProvider",(o,e,t)=>{const n=o.get(pe),i=wW(n.declarationProvider,e,t,nt.None);return dy(()=>i)});El("_executeReferenceProvider",(o,e,t)=>{const n=o.get(pe),i=mE(n.referenceProvider,e,t,!1,nt.None);return dy(()=>i)});El("_executeImplementationProvider",(o,e,t)=>{const n=o.get(pe),i=CW(n.implementationProvider,e,t,nt.None);return dy(()=>i)});var Mg,Og,Pg,_b,yb,bb,vb,Sb;yi.appendMenuItem(L.EditorContext,{submenu:L.EditorContextPeek,title:m("peek.submenu","Peek"),group:"navigation",order:100});class Dm{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Dm||F.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class $i extends ma{static all(){return $i._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const n of lt.wrap(t.menu))(n.id===L.EditorContext||n.id===L.EditorContextPeek)&&(n.when=J.and(e.precondition,n.when));return t}constructor(e,t){super($i._patchConfig(t)),this.configuration=e,$i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,i){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(Rn),s=e.get(gt),a=e.get(pu),l=e.get(fE),c=e.get(pe),d=e.get(Ae),u=t.getModel(),h=t.getPosition(),f=Dm.is(n)?n:new Dm(u,h),p=new $d(t,5),g=Kw(this._getLocationModel(c,f.model,f.position,p.token),p.token).then(async _=>{var y;if(!_||p.token.isCancellationRequested)return;$r(_.ariaMessage);let b;if(_.referenceAt(u.uri,h)){const S=this._getAlternativeCommand(t);!$i._activeAlternativeCommands.has(S)&&$i._allSymbolNavigationCommands.has(S)&&(b=$i._allSymbolNavigationCommands.get(S))}const v=_.references.length;if(v===0){if(!this.configuration.muteMessage){const S=u.getWordAtPosition(h);(y=ur.get(t))===null||y===void 0||y.showMessage(this._getNoResultFoundMessage(S),h)}}else if(v===1&&b)$i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(S=>b.runEditorCommand(S,t,n,i).finally(()=>{$i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,_,i)},_=>{r.error(_)}).finally(()=>{p.dispose()});return a.showWhile(g,250),g}async _onResult(e,t,n,i,r){const s=this._getGoToPreference(n);if(!(n instanceof Yd)&&(this.configuration.openInPeek||s==="peek"&&i.references.length>1))this._openInPeek(n,i,r);else{const a=i.firstReference(),l=i.references.length>1&&s==="gotoAndPeek",c=await this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,i,r):i.dispose(),s==="goto"&&t.put(a)}}async _openReference(e,t,n,i,r){let s;if(pz(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;const a=await t.openCodeEditor({resource:n.uri,options:{selection:T.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,i);if(a){if(r){const l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}}_openInPeek(e,t,n){const i=Zd.get(e);i&&e.hasModel()?i.toggleWidget(n??e.getSelection(),ei(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}$i._allSymbolNavigationCommands=new Map;$i._activeAlternativeCommands=new Set;class uy extends $i{async _getLocationModel(e,t,n,i){return new jr(await pE(e.definitionProvider,t,n,i),m("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?m("noResultWord","No definition found for '{0}'",e.word):m("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}Jt((Mg=class extends uy{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Mg.id,title:{value:m("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:m({},"Go to &&Definition")},precondition:J.and(A.hasDefinitionProvider,A.isInWalkThroughSnippet.toNegated()),keybinding:[{when:A.editorTextFocus,primary:70,weight:100},{when:J.and(A.editorTextFocus,mB),primary:2118,weight:100}],menu:[{id:L.EditorContext,group:"navigation",order:1.1},{id:L.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ct.registerCommandAlias("editor.action.goToDeclaration",Mg.id)}},Mg.id="editor.action.revealDefinition",Mg));Jt((Og=class extends uy{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Og.id,title:{value:m("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:J.and(A.hasDefinitionProvider,A.isInWalkThroughSnippet.toNegated()),keybinding:[{when:A.editorTextFocus,primary:Gn(2089,70),weight:100},{when:J.and(A.editorTextFocus,mB),primary:Gn(2089,2118),weight:100}]}),ct.registerCommandAlias("editor.action.openDeclarationToTheSide",Og.id)}},Og.id="editor.action.revealDefinitionAside",Og));Jt((Pg=class extends uy{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Pg.id,title:{value:m("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:J.and(A.hasDefinitionProvider,Dr.notInPeekEditor,A.isInWalkThroughSnippet.toNegated()),keybinding:{when:A.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:L.EditorContextPeek,group:"peek",order:2}}),ct.registerCommandAlias("editor.action.previewDeclaration",Pg.id)}},Pg.id="editor.action.peekDefinition",Pg));class xW extends $i{async _getLocationModel(e,t,n,i){return new jr(await wW(e.declarationProvider,t,n,i),m("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}Jt((_b=class extends xW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:_b.id,title:{value:m("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:m({},"Go to &&Declaration")},precondition:J.and(A.hasDeclarationProvider,A.isInWalkThroughSnippet.toNegated()),menu:[{id:L.EditorContext,group:"navigation",order:1.3},{id:L.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}},_b.id="editor.action.revealDeclaration",_b));Jt(class extends xW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:m("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:J.and(A.hasDeclarationProvider,Dr.notInPeekEditor,A.isInWalkThroughSnippet.toNegated()),menu:{id:L.EditorContextPeek,group:"peek",order:3}})}});class TW extends $i{async _getLocationModel(e,t,n,i){return new jr(await EW(e.typeDefinitionProvider,t,n,i),m("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?m("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):m("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}Jt((yb=class extends TW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:yb.ID,title:{value:m("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:m({},"Go to &&Type Definition")},precondition:J.and(A.hasTypeDefinitionProvider,A.isInWalkThroughSnippet.toNegated()),keybinding:{when:A.editorTextFocus,primary:0,weight:100},menu:[{id:L.EditorContext,group:"navigation",order:1.4},{id:L.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},yb.ID="editor.action.goToTypeDefinition",yb));Jt((bb=class extends TW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:bb.ID,title:{value:m("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:J.and(A.hasTypeDefinitionProvider,Dr.notInPeekEditor,A.isInWalkThroughSnippet.toNegated()),menu:{id:L.EditorContextPeek,group:"peek",order:4}})}},bb.ID="editor.action.peekTypeDefinition",bb));class LW extends $i{async _getLocationModel(e,t,n,i){return new jr(await CW(e.implementationProvider,t,n,i),m("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?m("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):m("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}Jt((vb=class extends LW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:vb.ID,title:{value:m("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:m({},"Go to &&Implementations")},precondition:J.and(A.hasImplementationProvider,A.isInWalkThroughSnippet.toNegated()),keybinding:{when:A.editorTextFocus,primary:2118,weight:100},menu:[{id:L.EditorContext,group:"navigation",order:1.45},{id:L.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},vb.ID="editor.action.goToImplementation",vb));Jt((Sb=class extends LW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Sb.ID,title:{value:m("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:J.and(A.hasImplementationProvider,Dr.notInPeekEditor,A.isInWalkThroughSnippet.toNegated()),keybinding:{when:A.editorTextFocus,primary:3142,weight:100},menu:{id:L.EditorContextPeek,group:"peek",order:5}})}},Sb.ID="editor.action.peekImplementation",Sb));class kW extends $i{_getNoResultFoundMessage(e){return e?m("references.no","No references found for '{0}'",e.word):m("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}Jt(class extends kW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:m("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:m({},"Go to &&References")},precondition:J.and(A.hasReferenceProvider,Dr.notInPeekEditor,A.isInWalkThroughSnippet.toNegated()),keybinding:{when:A.editorTextFocus,primary:1094,weight:100},menu:[{id:L.EditorContext,group:"navigation",order:1.45},{id:L.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,n,i){return new jr(await mE(e.referenceProvider,t,n,!0,i),m("ref.title","References"))}});Jt(class extends kW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:m("references.action.label","Peek References"),original:"Peek References"},precondition:J.and(A.hasReferenceProvider,Dr.notInPeekEditor,A.isInWalkThroughSnippet.toNegated()),menu:{id:L.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,n,i){return new jr(await mE(e.referenceProvider,t,n,!1,i),m("ref.title","References"))}});class jfe extends $i{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:m("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:J.and(Dr.notInPeekEditor,A.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}async _getLocationModel(e,t,n,i){return new jr(this._references,m("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&m("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}ct.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Te},{name:"position",description:"The position at which to start",constraint:F.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(o,e,t,n,i,r,s)=>{Lt(Te.isUri(e)),Lt(F.isIPosition(t)),Lt(Array.isArray(n)),Lt(typeof i>"u"||typeof i=="string"),Lt(typeof s>"u"||typeof s=="boolean");const a=o.get(gt),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(vl(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{const d=new class extends jfe{_getNoResultFoundMessage(u){return r||super._getNoResultFoundMessage(u)}}({muteMessage:!r,openInPeek:!!s,openToSide:!1},n,i);c.get(Ae).invokeFunction(d.run.bind(d),l)})}});ct.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Te},{name:"position",description:"The position at which to start",constraint:F.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(o,e,t,n,i)=>{o.get(hn).executeCommand("editor.action.goToLocations",e,t,n,i,void 0,!0)}});ct.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{Lt(Te.isUri(e)),Lt(F.isIPosition(t));const n=o.get(pe),i=o.get(gt);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(r=>{if(!vl(r)||!r.hasModel())return;const s=Zd.get(r);if(!s)return;const a=ei(c=>mE(n.referenceProvider,r.getModel(),F.lift(t),!1,c).then(d=>new jr(d,m("ref.title","References")))),l=new T(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});ct.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var Kfe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},P2=function(o,e){return function(t,n){e(t,n,o)}},l_;let $h=l_=class{constructor(e,t,n,i){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=i,this.toUnhook=new Y,this.toUnhookForKeyboard=new Y,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new lE(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,a??void 0)})),this.toUnhook.add(r.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{We(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(l_.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}async startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const i=new nV(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=ei(a=>this.findDefinition(e,a));let r;try{r=await this.previousPromise}catch(a){We(a);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const s=r[0].originSelectionRange?T.lift(r[0].originSelectionRange):new T(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let a=s;for(const{originSelectionRange:l}of r)l&&(a=T.plusRange(a,l));this.addDecoration(a,new Pi().appendText(m("multipleResults","Click to show {0} definitions.",r.length)))}else{const a=r[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:c}}=l,{startLineNumber:d}=a.range;if(d<1||d>c.getLineCount()){l.dispose();return}const u=this.getPreviewValue(c,d,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(s,u?new Pi().appendCodeblock(h||"",u):void 0),l.dispose()})}}getPreviewValue(e,t,n){let i=n.range;return i.endLineNumber-i.startLineNumber>=l_.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,i)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<n.endLineNumber;a++){const l=e.getLineFirstNonWhitespaceColumn(a);r=Math.min(r,l)}return e.getValueInRange(n).replace(new RegExp(`^\\s{${r-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const n=e.getLineFirstNonWhitespaceColumn(t),i=Math.min(e.getLineCount(),t+l_.MAX_SOURCE_PREVIEW_LINES);let r=t+1;for(;r<i;r++){const s=e.getLineFirstNonWhitespaceColumn(r);if(n===s)break}return new T(t,1,r+1,1)}addDecoration(e,t){const n={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([n])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var n;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((n=e.target.detail.injectedText)===null||n===void 0?void 0:n.options)instanceof Kd)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const n=this.editor.getModel();return n?pE(this.languageFeaturesService.definitionProvider,n,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(n=>{const i=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(n);return new uy({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(Oe);return Dr.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};$h.ID="editor.contrib.gotodefinitionatposition";$h.MAX_SOURCE_PREVIEW_LINES=8;$h=l_=Kfe([P2(1,Rr),P2(2,Yt),P2(3,pe)],$h);_t($h.ID,$h,2);let qfe=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}};class AW extends U{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new P),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Dt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Dt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Dt(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Tj(e=>this._computer.computeAsync(e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){We(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new qfe(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class F2{constructor(e,t,n,i){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=i,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class vv{constructor(e,t,n,i,r,s){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const vf=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class p6{constructor(){this._onDidWillResize=new P,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new P,this.onDidResize=this._onDidResize.event,this._sashListener=new Y,this._size=new pt(0,0),this._minSize=new pt(0,0),this._maxSize=new pt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Ri(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Ri(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Ri(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:FS.North}),this._southSash=new Ri(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:FS.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(le.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(le.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(le.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(le.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:r,width:s}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(i,Math.min(s,t));const a=new pt(t,e);pt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const $fe=30,Jfe=24;class Xfe extends U{constructor(e,t=new pt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new p6),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=pt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new pt(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?F.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:Fn(t).top+n.top-$fe}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const i=Fn(t),r=Dh(t.ownerDocument.body),s=i.top+n.top+n.height;return r.height-s-Jfe}_findPositionPreference(e,t){var n,i;const r=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),s=Math.min((i=this._availableVerticalSpaceAbove(t))!==null&&i!==void 0?i:1/0,e),a=Math.min(Math.max(s,r),e),l=Math.min(e,a);let c;return this._editor.getOption(60).above?c=l<=s?1:2:c=l<=r?2:1,c===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),c}_resize(e){this._resizableNode.layout(e.height,e.width)}}var m6=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},uh=function(o,e){return function(t,n){e(t,n,o)}},Sv,Ia;const G3=Z;let fw=Sv=class extends U{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(Ld,this._editor)),this._participants=[];for(const i of vf.getAll())this._participants.push(this._instantiationService.createInstance(i,this._editor));this._participants.sort((i,r)=>i.hoverOrdinal-r.hoverOrdinal),this._computer=new mw(this._editor,this._participants),this._hoverOperation=this._register(new AW(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{if(!this._computer.anchor)return;const r=i.hasLoadingMessage?this._addLoadingMessage(i.value):i.value;this._withResult(new IW(this._computer.anchor,r,i.isComplete))})),this._register(xn(this._widget.getDomNode(),"keydown",i=>{i.equals(9)&&this.hide()})),this._register(an.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}_startShowingOrUpdateHover(e,t,n,i,r){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):!1:this._editor.getOption(60).sticky&&r&&this._widget.isMouseGettingCloser(r.event.posx,r.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,i,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,i,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=i,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:n,showAtSecondaryPosition:i,highlightRange:r}=Sv.computeHoverRanges(this._editor,e.range,t),s=new Y,a=s.add(new pw(this._keybindingService)),l=document.createDocumentFragment();let c=null;const d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const f=t.filter(p=>p.owner===h);f.length>0&&s.add(h.renderHoverParts(d,f))}const u=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(r){const h=this._editor.createDecorationsCollection();h.set([{range:r,options:Sv._DECORATION_OPTIONS}]),s.add(Le(()=>{h.clear()}))}this._widget.showAt(l,new Qfe(e.initialMousePosX,e.initialMousePosY,c,n,i,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,u,s))}else s.dispose()}static computeHoverRanges(e,t,n){let i=1;if(e.hasModel()){const u=e._getViewModel(),h=u.coordinatesConverter,f=h.convertModelRangeToViewRange(t),p=new F(f.startLineNumber,u.getLineMinColumn(f.startLineNumber));i=h.convertViewPositionToModelPosition(p).column}const r=t.startLineNumber;let s=t.startColumn,a=n[0].range,l=null;for(const u of n)a=T.plusRange(a,u.range),u.range.startLineNumber===r&&u.range.endLineNumber===r&&(s=Math.max(Math.min(s,u.range.startColumn),i)),u.forceShowAtRange&&(l=u.range);const c=l?l.getStartPosition():new F(r,t.startColumn),d=l?l.getStartPosition():new F(r,s);return{showAtPosition:c,showAtSecondaryPosition:d,highlightRange:a}}showsOrWillShow(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const r=i.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;if(n.type===6&&t.push(new F2(0,n.range,e.event.posx,e.event.posy)),n.type===7){const i=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToText<i&&t.push(new F2(0,n.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((i,r)=>r.priority-i.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,i){this._startShowingOrUpdateHover(new F2(0,e,void 0,void 0),t,n,i,null)}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}get widget(){return this._widget}};fw._DECORATION_OPTIONS=He.register({description:"content-hover-highlight",className:"hoverHighlight"});fw=Sv=m6([uh(1,Ae),uh(2,It)],fw);class IW{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){const t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new Yfe(this,this.anchor,t,this.isComplete)}}class Yfe extends IW{constructor(e,t,n,i){super(t,n,i),this.original=e}filter(e){return this.original.filter(e)}}class Qfe{constructor(e,t,n,i,r,s,a,l,c,d){this.initialMousePosX=e,this.initialMousePosY=t,this.colorPicker=n,this.showAtPosition=i,this.showAtSecondaryPosition=r,this.preferAbove=s,this.stoleFocus=a,this.source=l,this.isBeforeContent=c,this.disposables=d,this.closestMouseDistance=void 0}}const z3=30,B2=10,Zfe=6;let Ld=Ia=class extends Xfe{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,n,i,r){const s=e.getOption(66)+8,a=150,l=new pt(a,s);super(e,l),this._configurationService=n,this._accessibilityService=i,this._keybindingService=r,this._hover=this._register(new tR),this._minimumSize=l,this._hoverVisibleKey=A.hoverVisible.bindTo(t),this._hoverFocusedKey=A.hoverFocused.bindTo(t),X(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(50)&&this._updateFont()}));const c=this._register(oa(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Ia.ID}static _applyDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=i,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return Ia._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return Ia._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=i,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){Ia._applyMaxDimensions(this._hover.contentsDomNode,e,t),Ia._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-B2))}_updateResizableNodeMaxDimensions(){var e,t;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,i=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new pt(n,i),this._setHoverWidgetMaxDimensions(n,i)}_resize(e){var t,n;Ia._lastDimensions=new pt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Zfe;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=B2),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<t?Dh(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const n=Fn(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=j3(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const i=j3(e,t,n.left,n.top,n.width,n.height);return i>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,i),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(r=>this._editor.applyFontInfo(r))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Ia._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Ia._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var n,i,r,s;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const a=nh(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(a,l))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout();const d=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&TF(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(s=(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||r===void 0?void 0:r.getAriaLabel())!==null&&s!==void 0?s:"");d&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+d)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new pt(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const n=this._hover.containerDomNode,i=this._hover.contentsDomNode,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(vr(n),Math.min(r,e)),this._setContentsDomNodeDimensions(vr(i),Math.min(r,e-B2))}setMinimumDimensions(e){this._minimumSize=new pt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new pt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let n=nh(t),i=vr(t);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=nh(t),i=vr(t),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(n,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const r=nh(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-z3})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+z3})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};Ld.ID="editor.contrib.resizableContentHoverWidget";Ld._lastDimensions=new pt(0,0);Ld=Ia=m6([uh(1,Oe),uh(2,rt),uh(3,ws),uh(4,It)],Ld);let pw=class extends U{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=G3("div.hover-row.status-bar"),this.actionsElement=X(this.hoverElement,G3("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(EC.render(this.actionsElement,e,n))}append(e){const t=X(this.actionsElement,e);return this._hasContent=!0,t}};pw=m6([uh(0,It)],pw);class mw{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),i=t.range.startLineNumber;if(i>n.getLineCount())return[];const r=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter(s=>{if(s.options.isWholeLine)return!0;const a=s.range.startLineNumber===i?s.range.startColumn:1,l=s.range.endLineNumber===i?s.range.endColumn:r;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return On.EMPTY;const n=mw._getLineDecorations(this._editor,t);return On.merge(this._participants.map(i=>i.computeAsync?i.computeAsync(t,n,e):On.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=mw._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return na(t)}}function j3(o,e,t,n,i,r){const s=t+i/2,a=n+r/2,l=Math.max(Math.abs(o-s)-i/2,0),c=Math.max(Math.abs(e-a)-r/2,0);return Math.sqrt(l*l+c*c)}const K3=Z;class Kp extends U{constructor(e,t,n){super(),this._renderDisposeables=this._register(new Y),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new tR),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new gl({editor:this._editor},t,n)),this._computer=new epe(this._editor),this._hoverOperation=this._register(new AW(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{this._withResult(i.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Kp.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const i of t){const r=K3("div.hover-row.markdown-hover"),s=X(r,K3("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(i.value));s.appendChild(a.element),n.appendChild(r)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),i=this._editor.getScrollTop(),r=this._editor.getOption(66),s=this._hover.containerDomNode.clientHeight,a=n-i-(s-r)/2,l=t.glyphMarginLeft+t.glyphMarginWidth+(this._computer.lane==="lineNo"?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${l}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}Kp.ID="editor.contrib.modesGlyphHoverWidget";class epe{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=fl.Center}computeSync(){var e,t;const n=a=>({value:a}),i=this._editor.getLineDecorations(this._lineNumber),r=[],s=this._laneOrLine==="lineNo";if(!i)return r;for(const a of i){const l=(t=(e=a.options.glyphMargin)===null||e===void 0?void 0:e.position)!==null&&t!==void 0?t:fl.Center;if(!s&&l!==this._laneOrLine)continue;const c=s?a.options.lineNumberHoverMessage:a.options.glyphMarginHoverMessage;!c||_m(c)||r.push(...CD(c).map(n))}return r}}class tpe{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}async function npe(o,e,t,n,i){try{const r=await Promise.resolve(o.provideHover(t,n,i));if(r&&rpe(r))return new tpe(o,r,e)}catch(r){Bn(r)}}function g6(o,e,t,n){const r=o.ordered(e).map((s,a)=>npe(s,a,e,t,n));return On.fromPromises(r).coalesce()}function ipe(o,e,t,n){return g6(o,e,t,n).map(i=>i.hover).toPromise()}El("_executeHoverProvider",(o,e,t)=>{const n=o.get(pe);return ipe(n.hoverProvider,e,t,nt.None)});function rpe(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var ope=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wb=function(o,e){return function(t,n){e(t,n,o)}};const q3=Z;class Ks{constructor(e,t,n,i,r){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=i,this.ordinal=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let gw=class{constructor(e,t,n,i,r){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=i,this._languageFeaturesService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new Ks(this,e.range,[new Pi().appendText(m("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),s=[];let a=1e3;const l=n.getLineLength(i),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(116),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c});let h=!1;d>=0&&l>d&&e.range.startColumn>=d&&(h=!0,s.push(new Ks(this,e.range,[{value:m("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof u=="number"&&l>=u&&s.push(new Ks(this,e.range,[{value:m("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(const p of t){const g=p.range.startLineNumber===i?p.range.startColumn:1,_=p.range.endLineNumber===i?p.range.endColumn:r,y=p.options.hoverMessage;if(!y||_m(y))continue;p.options.beforeContentClassName&&(f=!0);const b=new T(e.range.startLineNumber,g,e.range.startLineNumber,_);s.push(new Ks(this,b,CD(y),f,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return On.EMPTY;const i=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(i))return On.EMPTY;const r=new F(e.range.startLineNumber,e.range.startColumn);return g6(this._languageFeaturesService.hoverProvider,i,r,n).filter(s=>!_m(s.hover.contents)).map(s=>{const a=s.hover.range?T.lift(s.hover.range):e.range;return new Ks(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return DW(e,t,this._editor,this._languageService,this._openerService)}};gw=ope([wb(1,Yt),wb(2,Mr),wb(3,rt),wb(4,pe)],gw);function DW(o,e,t,n,i){e.sort((s,a)=>s.ordinal-a.ordinal);const r=new Y;for(const s of e)for(const a of s.contents){if(_m(a))continue;const l=q3("div.hover-row.markdown-hover"),c=X(l,q3("div.hover-contents")),d=r.add(new gl({editor:t},n,i));r.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",o.onContentsChanged()}));const u=r.add(d.render(a));c.appendChild(u.element),o.fragment.appendChild(l)}return r}var NW=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_w=function(o,e){return function(t,n){e(t,n,o)}};class $3{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let nI=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new P,this.onDidChange=this._onDidChange.event,this._dispoables=new Y,this._markers=[],this._nextIdx=-1,Te.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const i=this._configService.getValue("problems.sortOrder"),r=(a,l)=>{let c=t1(a.resource.toString(),l.resource.toString());return c===0&&(i==="position"?c=T.compareRangesUsingStarts(a,l)||un.compare(a.severity,l.severity):c=un.compare(a.severity,l.severity)||T.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:Te.isUri(e)?e:void 0,severities:un.Error|un.Warning|un.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(r)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new $3(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());r<0&&(r=$_(this._markers,{resource:e.uri},(s,a)=>t1(s.resource.toString(),a.resource.toString())),r<0&&(r=~r));for(let s=r;s<this._markers.length;s++){let a=T.lift(this._markers[s]);if(a.isEmpty()){const l=e.getWordAtPosition(a.getStartPosition());l&&(a=new T(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=s,i=!0;break}if(this._markers[s].resource.toString()!==e.uri.toString())break}i||(this._nextIdx=n?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,n){if(this._markers.length===0)return!1;const i=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,n,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),i!==this._nextIdx}find(e,t){let n=this._markers.findIndex(i=>i.resource.toString()===e.toString());if(!(n<0)){for(;n<this._markers.length;n++)if(T.containsPosition(this._markers[n],t))return new $3(this._markers[n],n+1,this._markers.length)}}};nI=NW([_w(1,Tl),_w(2,rt)],nI);const RW=it("IMarkerNavigationService");let iI=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new ar}getMarkerList(e){for(const t of this._provider){const n=t.getMarkerList(e);if(n)return n}return new nI(e,this._markerService,this._configService)}};iI=NW([_w(0,Tl),_w(1,rt)],iI);dt(RW,iI,1);var rI;(function(o){function e(t){switch(t){case wn.Ignore:return"severity-ignore "+ke.asClassName(se.info);case wn.Info:return ke.asClassName(se.info);case wn.Warning:return ke.asClassName(se.warning);case wn.Error:return ke.asClassName(se.error);default:return""}}o.className=e})(rI||(rI={}));var spe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ff=function(o,e){return function(t,n){e(t,n,o)}},oI;class ape{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new Y,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(xn(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new v9(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){xt(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let s=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?s+=r.length:s+=r.value.length);const a=hl(n);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);ki(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||r){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(r)if(typeof r=="string"){const f=document.createElement("span");f.innerText=`(${r})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=Z("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=p=>{this._openerService.open(r.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()};const f=X(this._codeLink,Z("span"));f.innerText=r.value,h.appendChild(this._codeLink)}}if(ki(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Fi(i)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const f of i){const p=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,g.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(g,f);const _=document.createElement("span");_.innerText=f.message,p.appendChild(g),p.appendChild(_),this._lines+=1,h.appendChild(p)}}const c=this._editor.getOption(50),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case un.Error:t=m("Error","Error");break;case un.Warning:t=m("Warning","Warning");break;case un.Info:t=m("Info","Info");break;case un.Hint:t=m("Hint","Hint");break}let n=m("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();return i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1&&(n=`${i.getLineContent(e.startLineNumber)}, ${n}`),n}}let Nm=oI=class extends hw{constructor(e,t,n,i,r,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new Y,this._onDidSelectRelatedInformation=new P,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=un.Warning,this._backgroundColor=H.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(upe);let t=sI,n=lpe;this._severity===un.Warning?(t=wv,n=cpe):this._severity===un.Info&&(t=aI,n=dpe);const i=e.getColor(t),r=e.getColor(n);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:r,primaryHeadingColor:e.getColor(bW),secondaryHeadingColor:e.getColor(vW)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(i=>this.editor.focus()));const t=[],n=this._menuService.createMenu(oI.TitleMenu,this._contextKeyService);gR(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=X(e,Z(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new ape(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const i=T.lift(e),r=this.editor.getPosition(),s=r&&i.containsPosition(r)?r:i.getStartPosition();super.show(s,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=n>1?m("problems","{0} of {1} problems",t,n):m("change","{0} of {1} problem",t,n);this.setTitle(Ko(a.uri),l)}this._icon.className=`codicon ${rI.className(un.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Nm.TitleMenu=new L("gotoErrorTitleMenu");Nm=oI=spe([Ff(1,ti),Ff(2,Mr),Ff(3,pa),Ff(4,Ae),Ff(5,Oe),Ff(6,ym)],Nm);const J3=y1(Ya,RJ),X3=y1(Ji,g1),Y3=y1(Lr,_1),sI=I("editorMarkerNavigationError.background",{dark:J3,light:J3,hcDark:ot,hcLight:ot},m("editorMarkerNavigationError","Editor marker navigation widget error color.")),lpe=I("editorMarkerNavigationError.headerBackground",{dark:ve(sI,.1),light:ve(sI,.1),hcDark:null,hcLight:null},m("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),wv=I("editorMarkerNavigationWarning.background",{dark:X3,light:X3,hcDark:ot,hcLight:ot},m("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),cpe=I("editorMarkerNavigationWarning.headerBackground",{dark:ve(wv,.1),light:ve(wv,.1),hcDark:"#0C141F",hcLight:ve(wv,.2)},m("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),aI=I("editorMarkerNavigationInfo.background",{dark:Y3,light:Y3,hcDark:ot,hcLight:ot},m("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),dpe=I("editorMarkerNavigationInfo.headerBackground",{dark:ve(aI,.1),light:ve(aI,.1),hcDark:null,hcLight:null},m("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),upe=I("editorMarkerNavigation.background",{dark:Zn,light:Zn,hcDark:Zn,hcLight:Zn},m("editorMarkerNavigationBackground","Editor marker navigation widget background."));var hpe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Cb=function(o,e){return function(t,n){e(t,n,o)}},c_;let eu=c_=class{static get(e){return e.getContribution(c_.ID)}constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new Y,this._editor=e,this._widgetVisible=MW.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Nm,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var i,r,s;(!(!((i=this._model)===null||i===void 0)&&i.selected)||!T.containsPosition((r=this._model)===null||r===void 0?void 0:r.selected.marker,n.position))&&((s=this._model)===null||s===void 0||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:T.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new F(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){var n,i;if(this._editor.hasModel()){const r=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(r.move(e,this._editor.getModel(),this._editor.getPosition()),!r.selected)return;if(r.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const s=await this._editorService.openCodeEditor({resource:r.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:r.selected.marker}},this._editor);s&&((n=c_.get(s))===null||n===void 0||n.close(),(i=c_.get(s))===null||i===void 0||i.nagivate(e,t))}else this._widget.showAtMarker(r.selected.marker,r.selected.index,r.selected.total)}}};eu.ID="editor.contrib.markerController";eu=c_=hpe([Cb(1,RW),Cb(2,Oe),Cb(3,gt),Cb(4,Ae)],eu);class gE extends fe{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}async run(e,t){var n;t.hasModel()&&((n=eu.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))}}class kd extends gE{constructor(){super(!0,!1,{id:kd.ID,label:kd.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:A.focus,primary:578,weight:100},menuOpts:{menuId:Nm.TitleMenu,title:kd.LABEL,icon:Tn("marker-navigation-next",se.arrowDown,m("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}kd.ID="editor.action.marker.next";kd.LABEL=m("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class vh extends gE{constructor(){super(!1,!1,{id:vh.ID,label:vh.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:A.focus,primary:1602,weight:100},menuOpts:{menuId:Nm.TitleMenu,title:vh.LABEL,icon:Tn("marker-navigation-previous",se.arrowUp,m("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}vh.ID="editor.action.marker.prev";vh.LABEL=m("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class fpe extends gE{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:m("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:A.focus,primary:66,weight:100},menuOpts:{menuId:L.MenubarGoMenu,title:m({},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class ppe extends gE{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:m("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:A.focus,primary:1090,weight:100},menuOpts:{menuId:L.MenubarGoMenu,title:m({},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}_t(eu.ID,eu,4);te(kd);te(vh);te(fpe);te(ppe);const MW=new ce("markersNavigationVisible",!1),mpe=di.bindToContribution(eu.get);ae(new mpe({id:"closeMarkersNavigation",precondition:MW,handler:o=>o.close(),kbOpts:{weight:150,kbExpr:A.focus,primary:9,secondary:[1033]}}));var gpe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},V2=function(o,e){return function(t,n){e(t,n,o)}};const ns=Z;class _pe{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Q3={type:1,filter:{include:Me.QuickFix},triggerAction:Jr.QuickFixHover};let lI=class{constructor(e,t,n,i){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=i,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),s=[];for(const a of t){const l=a.range.startLineNumber===i?a.range.startColumn:1,c=a.range.endLineNumber===i?a.range.endColumn:r,d=this._markerDecorationsService.getMarker(n.uri,a);if(!d)continue;const u=new T(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new _pe(this,u,d))}return s}renderHoverParts(e,t){if(!t.length)return U.None;const n=new Y;t.forEach(r=>e.fragment.appendChild(this.renderMarkerHover(r,n)));const i=t.length===1?t[0]:t.sort((r,s)=>un.compare(r.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,i,n),n}renderMarkerHover(e,t){const n=ns("div.hover-row"),i=X(n,ns("div.marker.hover-contents")),{source:r,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(i);const c=X(i,ns("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,r||a)if(a&&typeof a!="string"){const d=ns("span");if(r){const p=X(d,ns("span"));p.innerText=r}const u=X(d,ns("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(z(u,"click",p=>{this._openerService.open(a.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()}));const h=X(u,ns("span"));h.innerText=a.value;const f=X(i,d);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{const d=X(i,ns("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=r&&a?`${r}(${a})`:r||`(${a})`}if(Fi(l))for(const{message:d,resource:u,startLineNumber:h,startColumn:f}of l){const p=X(i,ns("div"));p.style.marginTop="8px";const g=X(p,ns("a"));g.innerText=`${Ko(u)}(${h}, ${f}): `,g.style.cursor="pointer",t.add(z(g,"click",y=>{y.stopPropagation(),y.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:f}}}).catch(We)}));const _=X(p,ns("span"));_.innerText=d,this._editor.applyFontInfo(_)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===un.Error||t.marker.severity===un.Warning||t.marker.severity===un.Info)&&e.statusBar.addAction({label:m("view problem","View Problem"),commandId:kd.ID,run:()=>{var i;e.hide(),(i=eu.get(this._editor))===null||i===void 0||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const i=e.statusBar.append(ns("div"));this.recentMarkerCodeActionsInfo&&(OS.makeKey(this.recentMarkerCodeActionsInfo.marker)===OS.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(i.textContent=m("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?U.None:Bd(()=>i.textContent=m("checkingForQuickFixes","Checking for quick fixes..."),200,n);i.textContent||(i.textContent=" ");const s=this.getCodeActions(t.marker);n.add(Le(()=>s.cancel())),s.then(a=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),i.textContent=m("noQuickFixes","No quick fixes available");return}i.style.display="none";let l=!1;n.add(Le(()=>{l||a.dispose()})),e.statusBar.addAction({label:m("quick fixes","Quick Fix..."),commandId:a6,run:c=>{l=!0;const d=Jd.get(this._editor),u=Fn(c);e.hide(),d==null||d.showCodeActions(Q3,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},We)}}getCodeActions(e){return ei(t=>W_(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new T(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Q3,hc.None,t))}};lI=gpe([V2(1,gN),V2(2,Mr),V2(3,pe)],lI);const OW="editor.action.inlineSuggest.commit",PW="editor.action.inlineSuggest.showPrevious",FW="editor.action.inlineSuggest.showNext";var _6=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},qs=function(o,e){return function(t,n){e(t,n,o)}},Cv;let cI=class extends U{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=cn(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=Ke(this,i=>{var r,s,a;const l=(r=this.model.read(i))===null||r===void 0?void 0:r.ghostText.read(i);if(!this.alwaysShowToolbar.read(i)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const c=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const d=new F(l.lineNumber,Math.min(c,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=d,d}),this._register(Ll((i,r)=>{const s=this.model.read(i);if(!s||!this.alwaysShowToolbar.read(i))return;const a=r.add(this.instantiationService.createInstance(tu,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var c;return(c=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&c!==void 0?c:[]})));e.addContentWidget(a),r.add(Le(()=>e.removeContentWidget(a))),r.add(bt(l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==cc.Explicit&&s.triggerExplicitly()}))}))}};cI=_6([qs(2,Ae)],cI);const ype=Tn("inline-suggestion-hints-next",se.chevronRight,m("parameterHintsNextIcon","Icon for show next parameter hint.")),bpe=Tn("inline-suggestion-hints-previous",se.chevronLeft,m("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let tu=Cv=class extends U{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const i=new Gr(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return r&&(s=m({},"{0} ({1})",t,r.getLabel())),i.tooltip=s,i}constructor(e,t,n,i,r,s,a,l,c,d,u){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=i,this._suggestionCount=r,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${Cv.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Wt("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Wt("div@toolBar")]),this.previousAction=this.createCommandAction(PW,m("previous","Previous"),ke.asClassName(bpe)),this.availableSuggestionCountAction=new Gr("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(FW,m("next","Next"),ke.asClassName(ype)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(L.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Dt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Dt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(dI,this.nodes.toolBar,L.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,f)=>{if(h instanceof ys)return l.createInstance(Spe,h,void 0);if(h===this.availableSuggestionCountAction){const p=new vpe(void 0,h,{label:!0,icon:!1});return p.setClass("availableSuggestionCount"),p}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{Cv._dropDownVisible=h})),this._register(bt(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(bt(h=>{const f=this._suggestionCount.read(h),p=this._currentSuggestionIdx.read(h);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${p+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(bt(h=>{const f=this._extraCommands.read(h);if(gn(this.lastCommands,f))return;this.lastCommands=f;const p=f.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:_=>this._commandService.executeCommand(g.id)}));for(const[g,_]of this.inlineCompletionsActionsMenus.getActions())for(const y of _)y instanceof ys&&p.push(y);p.length>0&&p.unshift(new qn),this.toolBar.setAdditionalSecondaryActions(p)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};tu._dropDownVisible=!1;tu.id=0;tu=Cv=_6([qs(6,hn),qs(7,Ae),qs(8,It),qs(9,Oe),qs(10,pa)],tu);class vpe extends Sm{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}let Spe=class extends Fh{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Wt("div.keybinding").root;new Y0(t,mo,{disableTitle:!0,...qse}).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},dI=class extends rw{constructor(e,t,n,i,r,s,a,l){super(e,{resetMenu:t,...n},i,r,s,a,l),this.menuId=t,this.options2=n,this.menuService=i,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,i,r,s,a;const l=[],c=[];gR(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(r=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||r===void 0?void 0:r.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),c.push(...this.additionalActions),l.unshift(...this.prependedPrimaryActions),this.setActions(l,c)}setPrependedPrimaryActions(e){gn(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){gn(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};dI=_6([qs(3,pa),qs(4,Oe),qs(5,ko),qs(6,It),qs(7,Xr)],dI);var wpe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Eb=function(o,e){return function(t,n){e(t,n,o)}},uI;let Nr=uI=class extends U{constructor(e,t,n,i,r){super(),this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=i,this._keybindingService=r,this._listenersStore=new Y,this._hoverState={mouseDown:!1,contentHoverFocused:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new Dt(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(uI.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.delay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._hoverState.mouseDown=!0;const n=e.target;if(n.type===9&&n.detail===Ld.ID){this._hoverState.contentHoverFocused=!0;return}n.type===12&&n.detail===Kp.ID||(n.type!==12&&(this._hoverState.contentHoverFocused=!1),!(!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing)&&this._hideWidgets())}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){var t,n;this._cancelScheduler();const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(i)||this._hideWidgets()}_isMouseOverWidget(e){var t,n,i,r,s;const a=e.target,l=this._hoverSettings.sticky;return!!(l&&a.type===9&&a.detail===Ld.ID||l&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((r=(i=e.event.browserEvent.view)===null||i===void 0?void 0:i.getSelection())===null||r===void 0)&&r.isCollapsed)||!l&&a.type===9&&a.detail===Ld.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible)||l&&a.type===12&&a.detail===Kp.ID)}_onEditorMouseMove(e){var t,n,i,r;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._hoverState.mouseDown&&this._hoverState.contentHoverFocused)return;const s=this._hoverSettings.sticky;if(s&&(!((i=this._contentWidget)===null||i===void 0)&&i.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}const l=this._hoverSettings.hidingDelay;if(!((r=this._contentWidget)===null||r===void 0)&&r.isVisible&&s&&l>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(l);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,n,i,r;if(!e)return;const s=e.target,a=(t=s.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),l=this._editor.getOption(146),c=this._hoverSettings.enabled,d=this._hoverState.activatedByDecoratorClick;if(a&&(l==="click"&&!d||l==="hover"&&!c||l==="clickAndHover"&&!c&&!d)||!a&&!c&&!d){this._hideWidgets();return}if(this._getOrCreateContentWidget().showsOrWillShow(e)){(n=this._glyphWidget)===null||n===void 0||n.hide();return}if(s.type===2&&s.position&&s.detail.glyphMarginLane){(i=this._contentWidget)===null||i===void 0||i.hide(),this._getOrCreateGlyphWidget().startShowingAt(s.position.lineNumber,s.detail.glyphMarginLane);return}if(s.type===3&&s.position){(r=this._contentWidget)===null||r===void 0||r.hide(),this._getOrCreateGlyphWidget().startShowingAt(s.position.lineNumber,"lineNo");return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||i||this._hideWidgets()}_hideWidgets(){var e,t,n;this._hoverState.mouseDown&&this._hoverState.contentHoverFocused&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||tu.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._hoverState.contentHoverFocused=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(fw,this._editor)),this._contentWidget}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=new Kp(this._editor,this._languageService,this._openerService)),this._glyphWidget}showContentHover(e,t,n,i,r=!1){this._hoverState.activatedByDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,i)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Nr.ID="editor.contrib.hover";Nr=uI=wpe([Eb(1,Ae),Eb(2,Mr),Eb(3,Yt),Eb(4,It)],Nr);var Ms;(function(o){o.NoAutoFocus="noAutoFocus",o.FocusIfVisible="focusIfVisible",o.AutoFocusImmediately="autoFocusImmediately"})(Ms||(Ms={}));class Cpe extends fe{constructor(){super({id:"editor.action.showHover",label:m({},"Show or Focus Hover"),metadata:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[Ms.NoAutoFocus,Ms.FocusIfVisible,Ms.AutoFocusImmediately],enumDescriptions:[m("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),m("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),m("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:Ms.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:A.editorTextFocus,primary:Gn(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;const i=Nr.get(t);if(!i)return;const r=n==null?void 0:n.focus;let s=Ms.FocusIfVisible;Object.values(Ms).includes(r)?s=r:typeof r=="boolean"&&r&&(s=Ms.AutoFocusImmediately);const a=c=>{const d=t.getPosition(),u=new T(d.lineNumber,d.column,d.lineNumber,d.column);i.showContentHover(u,1,1,c)},l=t.getOption(2)===2;i.isHoverVisible?s!==Ms.NoAutoFocus?i.focus():a(l):a(l||s===Ms.AutoFocusImmediately)}}class Epe extends fe{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:m({},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const n=Nr.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const r=new T(i.lineNumber,i.column,i.lineNumber,i.column),s=$h.get(t);if(!s)return;s.startFindDefinitionFromCursor(i).then(()=>{n.showContentHover(r,1,1,!0)})}}class xpe extends fe{constructor(){super({id:"editor.action.scrollUpHover",label:m({},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:16,weight:100}})}run(e,t){const n=Nr.get(t);n&&n.scrollUp()}}class Tpe extends fe{constructor(){super({id:"editor.action.scrollDownHover",label:m({},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:18,weight:100}})}run(e,t){const n=Nr.get(t);n&&n.scrollDown()}}class Lpe extends fe{constructor(){super({id:"editor.action.scrollLeftHover",label:m({},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:15,weight:100}})}run(e,t){const n=Nr.get(t);n&&n.scrollLeft()}}class kpe extends fe{constructor(){super({id:"editor.action.scrollRightHover",label:m({},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:17,weight:100}})}run(e,t){const n=Nr.get(t);n&&n.scrollRight()}}class Ape extends fe{constructor(){super({id:"editor.action.pageUpHover",label:m({},"Page Up Hover"),alias:"Page Up Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const n=Nr.get(t);n&&n.pageUp()}}class Ipe extends fe{constructor(){super({id:"editor.action.pageDownHover",label:m({},"Page Down Hover"),alias:"Page Down Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const n=Nr.get(t);n&&n.pageDown()}}class Dpe extends fe{constructor(){super({id:"editor.action.goToTopHover",label:m({},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const n=Nr.get(t);n&&n.goToTop()}}class Npe extends fe{constructor(){super({id:"editor.action.goToBottomHover",label:m({},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:A.hoverFocused,kbOpts:{kbExpr:A.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const n=Nr.get(t);n&&n.goToBottom()}}_t(Nr.ID,Nr,2);te(Cpe);te(Epe);te(xpe);te(Tpe);te(Lpe);te(kpe);te(Ape);te(Ipe);te(Dpe);te(Npe);vf.register(gw);vf.register(lI);$o((o,e)=>{const t=o.getColor(c9);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class hI extends U{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==cW||!n.range)return;const i=this._editor.getContribution(Nr.ID);if(i&&!i.isColorPickerVisible){const r=new T(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);i.showContentHover(r,1,0,!1,!0)}}}hI.ID="editor.contrib.colorContribution";_t(hI.ID,hI,2);vf.register(uw);var BW=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Gs=function(o,e){return function(t,n){e(t,n,o)}},fI,pI;let nu=fI=class extends U{constructor(e,t,n,i,r,s,a){super(),this._editor=e,this._modelService=n,this._keybindingService=i,this._instantiationService=r,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=A.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=A.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new yw(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(fI.ID)}};nu.ID="editor.contrib.standaloneColorPickerController";nu=fI=BW([Gs(1,Oe),Gs(2,Zt),Gs(3,It),Gs(4,Ae),Gs(5,pe),Gs(6,Ft)],nu);_t(nu.ID,nu,1);const Z3=8,Rpe=22;let yw=pI=class extends U{constructor(e,t,n,i,r,s,a,l){var c;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=r,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new P),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=i.createInstance(i0,this._editor),this._position=(c=this._editor._getViewModel())===null||c===void 0?void 0:c.getPrimaryCursorState().modelState.position;const d=this._editor.getSelection(),u=d?{startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(oa(this._body));this._register(h.onDidBlur(f=>{this.hide()})),this._register(h.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var p;const g=(p=f.target.element)===null||p===void 0?void 0:p.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return pI.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new Mpe(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=await this._standaloneColorPickerParticipant.createColorHover(t,new u6(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null}_render(e,t){const n=document.createDocumentFragment(),i=this._register(new pw(this._keybindingService));let r;const s={fragment:n,statusBar:i,setColorPicker:g=>r=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),r===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),r.layout();const a=r.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-Rpe-Z3,d=r.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});const u=r.header,h=u.pickedColorNode;h.style.width=l+Z3+"px";const f=u.originalColorNode;f.style.width=c+"px";const p=r.header.closeButton;p==null||p.onClicked(()=>{this.hide()}),t&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};yw.ID="editor.contrib.standaloneColorPickerWidget";yw=pI=BW([Gs(3,Ae),Gs(4,Zt),Gs(5,It),Gs(6,pe),Gs(7,Ft)],yw);class Mpe{constructor(e,t){this.value=e,this.foundInEditor=t}}class Ope extends ma{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:m("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:m({},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:L.CommandPalette}]})}runEditorCommand(e,t){var n;(n=nu.get(t))===null||n===void 0||n.showOrFocus()}}class Ppe extends fe{constructor(){super({id:"editor.action.hideColorPicker",label:m({},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:A.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=nu.get(t))===null||n===void 0||n.hide()}}class Fpe extends fe{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:m({},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:A.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=nu.get(t))===null||n===void 0||n.insertColor()}}te(Ppe);te(Fpe);Jt(Ope);class hd{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length,r=e.length;if(n+i>r)return!1;for(let s=0;s<i;s++){const a=e.charCodeAt(n+s),l=t.charCodeAt(s);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,s){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=r.getLineContent(a),h=r.getLineContent(c);let f=u.lastIndexOf(t,l-1+t.length),p=h.indexOf(n,d-1-n.length);if(f!==-1&&p!==-1)if(a===c)u.substring(f+t.length,p).indexOf(n)>=0&&(f=-1,p=-1);else{const _=u.substring(f+t.length),y=h.substring(0,p);(_.indexOf(n)>=0||y.indexOf(n)>=0)&&(f=-1,p=-1)}let g;f!==-1&&p!==-1?(i&&f+t.length<u.length&&u.charCodeAt(f+t.length)===32&&(t=t+" "),i&&p>0&&h.charCodeAt(p-1)===32&&(n=" "+n,p-=1),g=hd._createRemoveBlockCommentOperations(new T(a,f+t.length+1,c,p+1),t,n)):(g=hd._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(const _ of g)s.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(e,t,n){const i=[];return T.isEmpty(e)?i.push(tn.delete(new T(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(tn.delete(new T(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(tn.delete(new T(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){const r=[];return T.isEmpty(e)?r.push(tn.replace(new T(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(tn.insert(new F(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(tn.insert(new F(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),s=this.languageConfigurationService.getLanguageConfiguration(r).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const i=n[0],r=n[1];return new _e(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const i=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new _e(i.endLineNumber,i.endColumn+r,i.endLineNumber,i.endColumn+r)}}}class Wl{constructor(e,t,n,i,r,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=i,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,i){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),s=i.getLanguageConfiguration(r).comments,a=s?s.lineCommentToken:null;if(!a)return null;const l=[];for(let c=0,d=n-t+1;c<d;c++)l[c]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,n,i,r,s,a,l){let c=!0,d;e===0?d=!0:e===1?d=!1:d=!0;for(let u=0,h=i.length;u<h;u++){const f=i[u],p=r+u;if(p===r&&a){f.ignore=!0;continue}const g=n.getLineContent(p),_=Xi(g);if(_===-1){f.ignore=s,f.commentStrOffset=g.length;continue}if(c=!1,f.ignore=!1,f.commentStrOffset=_,d&&!hd._haystackHasNeedleAtOffset(g,f.commentStr,_)&&(e===0?d=!1:e===1||(f.ignore=!0)),d&&t){const y=_+f.commentStrLength;y<g.length&&g.charCodeAt(y)===32&&(f.commentStrLength+=1)}}if(e===0&&c){d=!1;for(let u=0,h=i.length;u<h;u++)i[u].ignore=!1}return{supported:!0,shouldRemoveComments:d,lines:i}}static _gatherPreflightData(e,t,n,i,r,s,a,l){const c=Wl._gatherPreflightCommentStrings(n,i,r,l);return c===null?{supported:!1}:Wl._analyzeLines(e,t,n,c,i,s,a,l)}_executeLineComments(e,t,n,i){let r;n.shouldRemoveComments?r=Wl._createRemoveLineCommentsOperations(n.lines,i.startLineNumber):(Wl._normalizeInsertionPoint(e,n.lines,i.startLineNumber,this._tabSize),r=this._createAddLineCommentsOperations(n.lines,i.startLineNumber));const s=new F(i.positionLineNumber,i.positionColumn);for(let a=0,l=r.length;a<l;a++)t.addEditOperation(r[a].range,r[a].text),T.isEmpty(r[a].range)&&T.getStartPosition(r[a].range).equals(s)&&e.getLineContent(s.lineNumber).length+1===s.column&&(this._deltaColumn=(r[a].text||"").length);this._selectionId=t.trackSelection(i)}_attemptRemoveBlockComment(e,t,n,i){let r=t.startLineNumber,s=t.endLineNumber;const a=i.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn);let l=e.getLineContent(r).lastIndexOf(n,a-1),c=e.getLineContent(s).indexOf(i,t.endColumn-1-n.length);return l!==-1&&c===-1&&(c=e.getLineContent(r).indexOf(i,l+n.length),s=r),l===-1&&c!==-1&&(l=e.getLineContent(s).lastIndexOf(n,c),r=s),t.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(r).indexOf(n),l!==-1&&(c=e.getLineContent(r).indexOf(i,l+n.length))),l!==-1&&e.getLineContent(r).charCodeAt(l+n.length)===32&&(n+=" "),c!==-1&&e.getLineContent(s).charCodeAt(c-1)===32&&(i=" "+i,c-=1),l!==-1&&c!==-1?hd._createRemoveBlockCommentOperations(new T(r,l+n.length+1,s,c+1),n,i):null}_executeBlockComment(e,t,n){e.tokenization.tokenizeIfCheap(n.startLineNumber);const i=e.getLanguageIdAtPosition(n.startLineNumber,1),r=this.languageConfigurationService.getLanguageConfiguration(i).comments;if(!r||!r.blockCommentStartToken||!r.blockCommentEndToken)return;const s=r.blockCommentStartToken,a=r.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,n,s,a);if(!l){if(n.isEmpty()){const c=e.getLineContent(n.startLineNumber);let d=Xi(c);d===-1&&(d=c.length),l=hd._createAddBlockCommentOperations(new T(n.startLineNumber,d+1,n.startLineNumber,c.length+1),s,a,this._insertSpace)}else l=hd._createAddBlockCommentOperations(new T(n.startLineNumber,e.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),s,a,this._insertSpace);l.length===1&&(this._deltaColumn=s.length+1)}this._selectionId=t.trackSelection(n);for(const c of l)t.addEditOperation(c.range,c.text)}getEditOperations(e,t){let n=this._selection;if(this._moveEndPositionDown=!1,n.startLineNumber===n.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new T(n.startLineNumber,e.getLineMaxColumn(n.startLineNumber),n.startLineNumber+1,1),n.startLineNumber===e.getLineCount()?"":`
|
|
672
672
|
`),this._selectionId=t.trackSelection(n);return}n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const i=Wl._gatherPreflightData(this._type,this._insertSpace,e,n.startLineNumber,n.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return i.supported?this._executeLineComments(e,t,i,n):this._executeBlockComment(e,t,n)}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),new _e(n.selectionStartLineNumber,n.selectionStartColumn+this._deltaColumn,n.positionLineNumber,n.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const n=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];s.ignore||n.push(tn.delete(new T(t+i,s.commentStrOffset+1,t+i,s.commentStrOffset+s.commentStrLength+1)))}return n}_createAddLineCommentsOperations(e,t){const n=[],i=this._insertSpace?" ":"";for(let r=0,s=e.length;r<s;r++){const a=e[r];a.ignore||n.push(tn.insert(new F(t+r,a.commentStrOffset+1),a.commentStr+i))}return n}static nextVisibleColumn(e,t,n,i){return n?e+(t-e%t):e+i}static _normalizeInsertionPoint(e,t,n,i){let r=1073741824,s,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(n+l);let u=0;for(let h=0,f=t[l].commentStrOffset;u<r&&h<f;h++)u=Wl.nextVisibleColumn(u,i,d.charCodeAt(h)===9,1);u<r&&(r=u)}r=Math.floor(r/i)*i;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(n+l);let u=0;for(s=0,a=t[l].commentStrOffset;u<r&&s<a;s++)u=Wl.nextVisibleColumn(u,i,d.charCodeAt(s)===9,1);u>r?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}class y6 extends fe{constructor(e,t){super(t),this._type=e}run(e,t){const n=e.get(Ft);if(!t.hasModel())return;const i=t.getModel(),r=[],s=i.getOptions(),a=t.getOption(23),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>T.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d<l.length;d++){const u=l[d];c.selection.endLineNumber===u.selection.startLineNumber&&(c.index<u.index?u.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=u))}for(const d of l)r.push(new Wl(n,d.selection,s.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}class Bpe extends y6{constructor(){super(0,{id:"editor.action.commentLine",label:m("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:A.writable,kbOpts:{kbExpr:A.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:L.MenubarEditMenu,group:"5_insert",title:m({},"&&Toggle Line Comment"),order:1}})}}class Vpe extends y6{constructor(){super(1,{id:"editor.action.addCommentLine",label:m("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:A.writable,kbOpts:{kbExpr:A.editorTextFocus,primary:Gn(2089,2081),weight:100}})}}class Wpe extends y6{constructor(){super(2,{id:"editor.action.removeCommentLine",label:m("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:A.writable,kbOpts:{kbExpr:A.editorTextFocus,primary:Gn(2089,2099),weight:100}})}}class Upe extends fe{constructor(){super({id:"editor.action.blockComment",label:m("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:A.writable,kbOpts:{kbExpr:A.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:L.MenubarEditMenu,group:"5_insert",title:m({},"Toggle &&Block Comment"),order:2}})}run(e,t){const n=e.get(Ft);if(!t.hasModel())return;const i=t.getOption(23),r=[],s=t.getSelections();for(const a of s)r.push(new hd(a,i.insertSpace,n));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}te(Bpe);te(Vpe);te(Wpe);te(Upe);var Hpe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ou=function(o,e){return function(t,n){e(t,n,o)}},mI;let Rm=mI=class{static get(e){return e.getContribution(mI.ID)}constructor(e,t,n,i,r,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=r,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new Y,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){const d=this._contextViewService.getContextViewElement(),u=c.srcElement;u.shadowRoot&&Nh(d)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(24)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?L.SimpleEditorContext:L.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const n=[],i=this._menuService.createMenu(t,this._contextKeyService),r=i.getActions({arg:e.uri});i.dispose();for(const s of r){const[,a]=s;let l=0;for(const c of a)if(c instanceof r1){const d=this._getMenuActions(e,c.item.submenu);d.length>0&&(n.push(new tm(c.id,c.label,d)),l++)}else n.push(c),l++;l&&n.push(new qn)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let i=t;if(!i){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Fn(this._editor.getDomNode()),l=a.left+s.left,c=a.top+s.top+s.height;i={x:l,y:c}}const r=this._editor.getOption(126)&&!ia;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>i,getActions:()=>e,getActionViewItem:s=>{const a=this._keybindingFor(s);if(a)return new Sm(s,s,{label:!0,keybinding:a.getLabel(),isMenu:!0});const l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new Sm(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||yre(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(72);let n=0;const i=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled>"u"?!0:c.enabled,checked:c.checked,run:c.run}),r=(c,d)=>new tm(`menu-action-${++n}`,c,d,void 0),s=(c,d,u,h,f)=>{if(!d)return i({label:c,enabled:d,run:()=>{}});const p=_=>()=>{this._configurationService.updateValue(u,_)},g=[];for(const _ of f)g.push(i({label:_.label,checked:h===_.value,run:p(_.value)}));return r(c,g)},a=[];a.push(i({label:m("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new qn),a.push(i({label:m("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(m("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:m("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:m("context.minimap.size.fill","Fill"),value:"fill"},{label:m("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(m("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:m("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:m("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(126)&&!ia;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Rm.ID="editor.contrib.contextmenu";Rm=mI=Hpe([Ou(1,ko),Ou(2,xl),Ou(3,Oe),Ou(4,It),Ou(5,pa),Ou(6,rt),Ou(7,Ph)],Rm);class Gpe extends fe{constructor(){super({id:"editor.action.showContextMenu",label:m("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:A.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Rm.get(t))===null||n===void 0||n.showContextMenu()}}_t(Rm.ID,Rm,2);te(Gpe);class W2{constructor(e){this.selections=e}equals(e){const t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let i=0;i<t;i++)if(!this.selections[i].equalsSelection(e.selections[i]))return!1;return!0}}class U2{constructor(e,t,n){this.cursorState=e,this.scrollTop=t,this.scrollLeft=n}}class Jh extends U{static get(e){return e.getContribution(Jh.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const n=new W2(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new U2(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new U2(new W2(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new U2(new W2(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}Jh.ID="editor.contrib.cursorUndoRedoController";class zpe extends fe{constructor(){super({id:"cursorUndo",label:m("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:A.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var i;(i=Jh.get(t))===null||i===void 0||i.cursorUndo()}}class jpe extends fe{constructor(){super({id:"cursorRedo",label:m("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var i;(i=Jh.get(t))===null||i===void 0||i.cursorRedo()}}_t(Jh.ID,Jh,0);te(zpe);te(jpe);class Kpe{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){const n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new T(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new _e(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new _e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}function Bf(o){return at?o.altKey:o.ctrlKey}class fc extends U{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(Bf(e)&&(this._modifierPressed=!0),this._mouseDown&&Bf(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(Bf(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===fc.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const i=(this._editor.getSelections()||[]).filter(r=>t.position&&r.containsPosition(t.position));if(i.length===1)this._dragSelection=i[0];else return}Bf(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new F(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const i=this._editor.getSelection();if(i){const{selectionStartLineNumber:r,selectionStartColumn:s}=i;n=[new _e(r,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(i=>i.containsPosition(t)?new _e(t.lineNumber,t.column,t.lineNumber,t.column):i);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Bf(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(fc.ID,new Kpe(this._dragSelection,t,Bf(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new T(e.lineNumber,e.column,e.lineNumber,e.column),options:fc._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}fc.ID="editor.contrib.dragAndDrop";fc.TRIGGER_KEY_VALUE=at?6:5;fc._DECORATION_OPTIONS=He.register({description:"dnd-target",className:"dnd-target"});_t(fc.ID,fc,2);var b6=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},a0=function(o,e){return function(t,n){e(t,n,o)}};const _E=m("builtIn","Built-in");class v6{async provideDocumentPasteEdits(e,t,n,i,r){const s=await this.getEdit(n,r);return s?{insertText:s.insertText,label:s.label,detail:s.detail,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0}async provideDocumentOnDropEdits(e,t,n,i){const r=await this.getEdit(n,i);return r?{insertText:r.insertText,label:r.label,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0}}class VW extends v6{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[pn.text],this.pasteMimeTypes=[pn.text]}async getEdit(e,t){const n=e.get(pn.text);if(!n||e.has(pn.uriList))return;const i=await n.asString();return{handledMimeType:pn.text,label:m("text.label","Insert Plain Text"),detail:_E,insertText:i}}}class WW extends v6{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[pn.uriList],this.pasteMimeTypes=[pn.uriList]}async getEdit(e,t){const n=await UW(e);if(!n.length||t.isCancellationRequested)return;let i=0;const r=n.map(({uri:a,originalText:l})=>a.scheme===je.file?a.fsPath:(i++,l)).join(" ");let s;return i>0?s=n.length>1?m("defaultDropProvider.uriList.uris","Insert Uris"):m("defaultDropProvider.uriList.uri","Insert Uri"):s=n.length>1?m("defaultDropProvider.uriList.paths","Insert Paths"):m("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:pn.uriList,insertText:r,label:s,detail:_E}}}let bw=class extends v6{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[pn.uriList],this.pasteMimeTypes=[pn.uriList]}async getEdit(e,t){const n=await UW(e);if(!n.length||t.isCancellationRequested)return;const i=na(n.map(({uri:r})=>{const s=this._workspaceContextService.getWorkspaceFolder(r);return s?nee(s.uri,r):void 0}));if(i.length)return{handledMimeType:pn.uriList,insertText:i.join(" "),label:n.length>1?m("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):m("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:_E}}};bw=b6([a0(0,Ph)],bw);class qpe{constructor(){this.id="html",this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:pn.text}]}async provideDocumentPasteEdits(e,t,n,i,r){if(i.trigger!=="explicit"&&i.only!==this.id)return;const s=n.get("text/html"),a=await(s==null?void 0:s.asString());if(!(!a||r.isCancellationRequested))return{insertText:a,yieldTo:this._yieldTo,label:m("pasteHtmlLabel","Insert HTML"),detail:_E}}}async function UW(o){const e=o.get(pn.uriList);if(!e)return[];const t=await e.asString(),n=[];for(const i of sE.parse(t))try{n.push({uri:Te.parse(i),originalText:i})}catch{}return n}let gI=class extends U{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new VW)),this._register(e.documentOnDropEditProvider.register("*",new WW)),this._register(e.documentOnDropEditProvider.register("*",new bw(t)))}};gI=b6([a0(0,pe),a0(1,Ph)],gI);let _I=class extends U{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new VW)),this._register(e.documentPasteEditProvider.register("*",new WW)),this._register(e.documentPasteEditProvider.register("*",new bw(t))),this._register(e.documentPasteEditProvider.register("*",new qpe))}};_I=b6([a0(0,pe),a0(1,Ph)],_I);_t(vc.ID,vc,0);ey(_I);ae(new class extends di{constructor(){super({id:HV,precondition:GV,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var n;return(n=vc.get(e))===null||n===void 0?void 0:n.changePasteType()}});te(class extends fe{constructor(){super({id:"editor.action.pasteAs",label:m("pasteAs","Paste As..."),alias:"Paste As...",precondition:A.writable,metadata:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:m("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(o,e,t){var n;const i=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=vc.get(e))===null||n===void 0?void 0:n.pasteAs(i)}});te(class extends fe{constructor(){super({id:"editor.action.pasteAsText",label:m("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:A.writable})}run(o,e,t){var n;return(n=vc.get(e))===null||n===void 0?void 0:n.pasteAs("text")}});class $pe{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class e5{constructor(e){this.identifier=e}}const HW=it("treeViewsDndService");dt(HW,$pe,1);var Jpe=function(o,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,e,t,n);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(e,t,r):s(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xb=function(o,e){return function(t,n){e(t,n,o)}},yI;const GW="editor.experimental.dropIntoEditor.defaultProvider",zW="editor.changeDropType",jW=new ce("dropWidgetVisible",!1,m("dropWidgetVisible","Whether the drop widget is showing"));let Mm=yI=class extends U{static get(e){return e.getContribution(yI.ID)}constructor(e,t,n,i,r){super(),this._configService=n,this._languageFeaturesService=i,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=e0.getInstance(),this._dropProgressManager=this._register(t.createInstance(aw,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(cw,"dropIntoEditor",e,jW,{id:zW,label:m("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(s=>this.onDropIntoEditor(e,s.position,s.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,n){var i;if(!n.dataTransfer||!e.hasModel())return;(i=this._currentOperation)===null||i===void 0||i.cancel(),e.focus(),e.setPosition(t);const r=ei(async s=>{const a=new $d(e,1,void 0,s);try{const l=await this.extractDataTransferData(n);if(l.size===0||a.token.isCancellationRequested)return;const c=e.getModel();if(!c)return;const d=this._languageFeaturesService.documentOnDropEditProvider.ordered(c).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(f=>l.matches(f)):!0),u=await this.getDropEdits(d,c,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){const h=this.getInitialActiveEditIndex(c,u),f=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([T.fromPositions(t)],{activeEditIndex:h,allEdits:u},f,s)}}finally{a.dispose(),this._currentOperation===r&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(t,m("dropIntoEditorProgress","Running drop handlers. Click to cancel"),r),this._currentOperation=r}async getDropEdits(e,t,n,i,r){const s=await Kw(Promise.all(e.map(async l=>{try{const c=await l.provideDocumentOnDropEdits(t,n,i,r.token);if(c)return{...c,providerId:l.id}}catch(c){console.error(c)}})),r.token),a=na(s??[]);return WV(a)}getInitialActiveEditIndex(e,t){const n=this._configService.getValue(GW,{resource:e.uri});for(const[i,r]of Object.entries(n)){const s=t.findIndex(a=>r===a.providerId&&a.handledMimeType&&MV(i,[a.handledMimeType]));if(s>=0)return s}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new RV;const t=FV(e.dataTransfer);if(this.treeItemsTransfer.hasData(e5.prototype)){const n=this.treeItemsTransfer.getData(e5.prototype);if(Array.isArray(n))for(const i of n){const r=await this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(r)for(const[s,a]of r)t.replace(s,a)}}return t}};Mm.ID="editor.contrib.dropIntoEditorController";Mm=yI=Jpe([xb(1,Ae),xb(2,rt),xb(3,pe),xb(4,HW)],Mm);_t(Mm.ID,Mm,2);ae(new class extends di{constructor(){super({id:zW,precondition:jW,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var n;(n=Mm.get(e))===null||n===void 0||n.changeDropType()}});ey(gI);rn.as(ga.Configuration).registerConfiguration({...kC,properties:{[GW]:{type:"object",scope:5,description:m("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});class Ki{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){const t=this._editor.getModel().getDecorationsInRange(e);for(const n of t){const i=n.options;if(i===Ki._FIND_MATCH_DECORATION||i===Ki._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(e){let t=null,n=0;if(e)for(let i=0,r=this._decorations.length;i<r;i++){const s=this._editor.getModel().getDecorationRange(this._decorations[i]);if(e.equalsRange(s)){t=this._decorations[i],n=i+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(i=>{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,Ki._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,i.changeDecorationOptions(this._highlightedDecorationId,Ki._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let r=this._editor.getModel().getDecorationRange(t);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){const s=r.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);r=new T(r.startLineNumber,r.startColumn,s,a)}this._rangeHighlightDecorationId=i.addDecoration(r,Ki._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let i=Ki._FIND_MATCH_DECORATION;const r=[];if(e.length>1e3){i=Ki._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c));let u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let f=1,p=e.length;f<p;f++){const g=e[f].range;h+d>=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(r.push({range:new T(u,1,h,1),options:Ki._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=g.startLineNumber,h=g.endLineNumber)}r.push({range:new T(u,1,h,1),options:Ki._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let a=0,l=e.length;a<l;a++)s[a]={range:e[a].range,options:i};this._decorations=n.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,r),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>n.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,Ki._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(!(!i||i.endLineNumber>e.lineNumber)){if(i.endLineNumber<e.lineNumber)return i;if(!(i.endColumn>e.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;t<n;t++){const i=this._decorations[t],r=this._editor.getModel().getDecorationRange(i);if(!(!r||r.startLineNumber<e.lineNumber)){if(r.startLineNumber>e.lineNumber)return r;if(!(r.startColumn<e.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}}Ki._CURRENT_FIND_MATCH_DECORATION=He.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:ln(wN),position:wo.Center},minimap:{color:ln(dp),position:zr.Inline}});Ki._FIND_MATCH_DECORATION=He.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:ln(wN),position:wo.Center},minimap:{color:ln(dp),position:zr.Inline}});Ki._FIND_MATCH_NO_OVERVIEW_DECORATION=He.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});Ki._FIND_MATCH_ONLY_OVERVIEW_DECORATION=He.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:ln(wN),position:wo.Center}});Ki._RANGE_HIGHLIGHT_DECORATION=He.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});Ki._FIND_SCOPE_DECORATION=He.register({description:"find-scope",className:"findScope",isWholeLine:!0});class Xpe{constructor(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){const n=[];for(let s=0;s<this._ranges.length;s++)n.push({range:this._ranges[s],text:this._replaceStrings[s]});n.sort((s,a)=>T.compareRangesUsingStarts(s.range,a.range));const i=[];let r=n[0];for(let s=1;s<n.length;s++)r.range.endLineNumber===n[s].range.startLineNumber&&r.range.endColumn===n[s].range.startColumn?(r.range=r.range.plusRange(n[s].range),r.text=r.text+n[s].text):(i.push(r),r=n[s]);i.push(r);for(const s of i)t.addEditOperation(s.range,s.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function KW(o,e){if(o&&o[0]!==""){const t=t5(o,e,"-"),n=t5(o,e,"_");return t&&!n?n5(o,e,"-"):!t&&n?n5(o,e,"_"):o[0].toUpperCase()===o[0]?e.toUpperCase():o[0].toLowerCase()===o[0]?e.toLowerCase():Dz(o[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):o[0][0].toUpperCase()!==o[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function t5(o,e,t){return o[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&o[0].split(t).length===e.split(t).length}function n5(o,e,t){const n=e.split(t),i=o[0].split(t);let r="";return n.forEach((s,a)=>{r+=KW([i[a]],s)+t}),r.slice(0,-1)}class i5{constructor(e){this.staticValue=e,this.kind=0}}class Ype{constructor(e){this.pieces=e,this.kind=1}}class Om{static fromStaticValue(e){return new Om([Sh.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new i5(""):e.length===1&&e[0].staticValue!==null?this._state=new i5(e[0].staticValue):this._state=new Ype(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?KW(e,this._state.staticValue):this._state.staticValue;let n="";for(let i=0,r=this._state.pieces.length;i<r;i++){const s=this._state.pieces[i];if(s.staticValue!==null){n+=s.staticValue;continue}let a=Om._substitute(s.matchIndex,e);if(s.caseOps!==null&&s.caseOps.length>0){const l=[],c=s.caseOps.length;let d=0;for(let u=0,h=a.length;u<h;u++){if(d>=c){l.push(a.slice(u));break}switch(s.caseOps[d]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),d++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),d++;break;default:l.push(a[u])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e<t.length)return(t[e]||"")+n;n=String(e%10)+n,e=Math.floor(e/10)}return"$"+n}}class Sh{static staticValue(e){return new Sh(e,-1,null)}static caseOps(e,t){return new Sh(null,e,t)}constructor(e,t,n){this.staticValue=e,this.matchIndex=t,!n||n.length===0?this.caseOps=null:this.caseOps=n.slice(0)}}class Qpe{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,n){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Sh.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Sh.caseOps(e,n),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Sh.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new Om(this._result)}}function Zpe(o){if(!o||o.length===0)return new Om(null);const e=[],t=new Qpe(o);for(let n=0,i=o.length;n<i;n++){const r=o.charCodeAt(n);if(r===92){if(n++,n>=i)break;const s=o.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(`
|