var G3=Object.defineProperty;var Z3=(r,e,t)=>e in r?G3(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Xt=(r,e,t)=>(Z3(r,typeof e!="symbol"?e+"":e,t),t);import{g as Ai,d as Oc,E as En,I as eo,Q as QO,Y as JO,O as eP,U as Y3,S as X3,J as Bt,r as Ii,w as dl,n as fp,D as tP,G as Oa,H as pu,K as js,a0 as me,a1 as Q3,a2 as J3,B as Nw,b as kI,a3 as iP,a4 as nP,c as xI,F as Kp,L as lg,W as ez,A as tz,s as iz,l as nz,a5 as sz,h as Y_,v as X_,N as $h}from"./index-3c234266.js";import{t as KL,C as oz,L as rz}from"./index-08b117c0.js";import{A as II,_ as EI,B as sP,a as oP,b as az}from"./_plugin-vue_export-helper-a1ffee7e.js";import{I as lz,C as cz,c as dz,o as hz,s as uz,M as gz}from"./http-02c81b8c.js";import{l as f,i as ln,U as fz,a as Je,e as hl,b as Pn,m as rP,D as V,E as A,c as ts,d as Dh,f as pz,g as mz,h as _z,j as vz,k as aP,n as Mw,R as S,o as pp,p as In,q as lP,r as bz,s as Ro,t as gc,u as Ve,v as gs,w as _r,x as Hr,y as Es,C as T1,z as Ke,A as Cz,B as wz,F as Lt,T as TI,G as qb,H as Rw,I as cn,J as kh,K as ve,L as cP,M as qL,N as cd,O as dP,P as GL,Q as hP,S as Cn,V as Ao,W as Sz,X as N1,Y as yz,Z as A0,_ as wt,$ as Y,a0 as Lz,a1 as cg,a2 as Fn,a3 as oa,a4 as fc,a5 as NI,a6 as Gt,a7 as MI,a8 as ul,a9 as hr,aa as As,ab as mu,ac as Dz,ad as Ee,ae as kz,af as la,ag as Re,ah as xz,ai as hs,aj as gt,ak as Ts,al as ur,am as Iz,an as Yi,ao as Ct,ap as P,aq as Pl,ar as $s,as as RI,at as uP,au as M1,av as R1,aw as ue,ax as $d,ay as qp,az as Oo,aA as Ez,aB as gP,aC as Tz,aD as _u,aE as Q_,aF as Fl,aG as fP,aH as pc,aI as pP,aJ as Nz,aK as dg,aL as mP,aM as mc,aN as To,aO as Mz,aP as AI,aQ as Rz,aR as mp,aS as dn,aT as _p,aU as tr,aV as OI,aW as gr,aX as Az,aY as Gp,aZ as _P,a_ as vP,a$ as Oz,b0 as Pz,b1 as vu,b2 as A1,b3 as Fz,b4 as Bz,b5 as bP,b6 as CP,b7 as Wz,b8 as Vz,b9 as PI,ba as O1,bb as gb,bc as wP,bd as Hz,be as J_,bf as sd,bg as O0,bh as P1,bi as zz,bj as Fo,bk as Uz,bl as $z,bm as FI,bn as jz,bo as Za,bp as Kz,bq as SP,br as yP,bs as qz,bt as Gz,bu as Aw,bv as ZL,bw as LP,bx as Zp,by as Mn,bz as BI,bA as DP,bB as kP,bC as WI,bD as Zz,bE as ec,bF as Yz,bG as Xz,bH as Qz,bI as Jz,bJ as xP,bK as IP,bL as YL,bM as e4,bN as Yp,bO as t4,bP as Pc,bQ as st,bR as i4,bS as P0,bT as ev,bU as EP,bV as F1,bW as n4,bX as B1,bY as W1,bZ as s4,b_ as qg,b$ as Xs,c0 as d_,c1 as o4,c2 as TP,c3 as r4,c4 as NP,c5 as a4,c6 as l4,c7 as c4,c8 as d4,c9 as h4,ca as u4,cb as g4,cc as f4,cd as p4,ce as m4,cf as _4,cg as v4,ch as b4,ci as C4,cj as w4,ck as S4,cl as y4,cm as L4,cn as D4,co as k4,cp as x4,cq as I4,cr as E4,cs as T4,ct as N4,cu as M4,cv as MP,cw as R4,cx as A4,cy as O4,cz as P4,cA as F4,cB as B4,cC as W4,cD as V4,cE as Gg,cF as zi,cG as VI,cH as H4,cI as Ni,cJ as z4,cK as U4,cL as $4,cM as V1,cN as j4,cO as RP,cP as bu,cQ as AP,cR as Gb,cS as H1,cT as yo,cU as HI,cV as K4,cW as q4,cX as G4,cY as Z4,cZ as z1,c_ as XL,c$ as tc,d0 as Y4,d1 as X4,d2 as OP,d3 as PP,d4 as Q4,d5 as J4,d6 as eU}from"./editorWorker-3ed40424.js";import{u as FP,d as tU}from"./utils-ccf2ec76.js";import{c as iU}from"./componentList-d97405f6.js";import{u as nU,_ as sU}from"./index.vue_vue_type_style_index_0_lang-bef01711.js";import{d as oU}from"./defaultAmisConfig-97f3da4b.js";var rU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const aU=rU;var lU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const cU=lU;var dU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const hU=dU;function U1(r){for(var e=1;e1&&(de=Math.round(de/y)*y),de<=we.minSize+we.snapOffset+this[Ko]?de=we.minSize+this[Ko]:de>=this.size-(ae.minSize+ae.snapOffset+this[ka])&&(de=this.size-(ae.minSize+this[ka])),de>=we.maxSize-we.snapOffset+this[Ko]?de=we.maxSize+this[Ko]:de<=this.size-(ae.maxSize-ae.snapOffset+this[ka])&&(de=this.size-(ae.maxSize+this[ka])),Me.call(this,de),Kn(e,"onDrag",qo)(he()))}function xe(){var Ie=l[this.a].element,de=l[this.b].element,we=Ie[F0](),ae=de[F0]();this.size=we[i]+ae[i]+this[Ko]+this[ka],this.start=we[s],this.end=we[o]}function qe(Ie){if(!getComputedStyle)return null;var de=getComputedStyle(Ie);if(!de)return null;var we=Ie[a];return we===0?null:(D===tv?we-=parseFloat(de.paddingLeft)+parseFloat(de.paddingRight):we-=parseFloat(de.paddingTop)+parseFloat(de.paddingBottom),we)}function Ye(Ie){var de=qe(d);if(de===null||m.reduce(function(mi,hn){return mi+hn},0)>de)return Ie;var we=0,ae=[],pi=Ie.map(function(mi,hn){var zn=de*mi/100,Uo=iv(C,hn===0,hn===Ie.length-1,w),La=m[hn]+Uo;return zn0&&ae[hn]-we>0){var Uo=Math.min(we,ae[hn]-we);we-=Uo,zn=mi-Uo}return zn/de*100})}function fe(){var Ie=this,de=l[Ie.a].element,we=l[Ie.b].element;Ie.dragging&&Kn(e,"onDragEnd",qo)(he()),Ie.dragging=!1,bo[jo]("mouseup",Ie.stop),bo[jo]("touchend",Ie.stop),bo[jo]("touchcancel",Ie.stop),bo[jo]("mousemove",Ie.move),bo[jo]("touchmove",Ie.move),Ie.stop=null,Ie.move=null,de[jo]("selectstart",qo),de[jo]("dragstart",qo),we[jo]("selectstart",qo),we[jo]("dragstart",qo),de.style.userSelect="",de.style.webkitUserSelect="",de.style.MozUserSelect="",de.style.pointerEvents="",we.style.userSelect="",we.style.webkitUserSelect="",we.style.MozUserSelect="",we.style.pointerEvents="",Ie.gutter.style.cursor="",Ie.parent.style.cursor="",Xp.body.style.cursor=""}function Ce(Ie){if(!("button"in Ie&&Ie.button!==0)){var de=this,we=l[de.a].element,ae=l[de.b].element;de.dragging||Kn(e,"onDragStart",qo)(he()),Ie.preventDefault(),de.dragging=!0,de.move=We.bind(de),de.stop=fe.bind(de),bo[$o]("mouseup",de.stop),bo[$o]("touchend",de.stop),bo[$o]("touchcancel",de.stop),bo[$o]("mousemove",de.move),bo[$o]("touchmove",de.move),we[$o]("selectstart",qo),we[$o]("dragstart",qo),ae[$o]("selectstart",qo),ae[$o]("dragstart",qo),we.style.userSelect="none",we.style.webkitUserSelect="none",we.style.MozUserSelect="none",we.style.pointerEvents="none",ae.style.userSelect="none",ae.style.webkitUserSelect="none",ae.style.MozUserSelect="none",ae.style.pointerEvents="none",de.gutter.style.cursor=N,de.parent.style.cursor=N,Xp.body.style.cursor=N,xe.call(de),de.dragOffset=_e(Ie)-de.end}}g=Ye(g);var lt=[];l=t.map(function(Ie,de){var we={element:K1(Ie),size:g[de],minSize:m[de],maxSize:b[de],snapOffset:T[de],i:de},ae;if(de>0&&(ae={a:de-1,b:de,dragging:!1,direction:D,parent:d},ae[Ko]=iv(C,de-1===0,!1,w),ae[ka]=iv(C,!1,de===t.length-1,w),u==="row-reverse"||u==="column-reverse")){var pi=ae.a;ae.a=ae.b,ae.b=pi}if(de>0){var mi=R(de,D,we.element);ie(mi,C,de),ae[_f]=Ce.bind(ae),mi[$o]("mousedown",ae[_f]),mi[$o]("touchstart",ae[_f]),d.insertBefore(mi,we.element),ae.gutter=mi}return H(we.element,we.size,iv(C,de===0,de===t.length-1,w),de),de>0&<.push(ae),we});function Mi(Ie){var de=Ie.i===lt.length,we=de?lt[Ie.i-1]:lt[Ie.i];xe.call(we);var ae=de?we.size-Ie.minSize-we[ka]:Ie.minSize+we[Ko];Me.call(we,ae)}l.forEach(function(Ie){var de=Ie.element[F0]()[i];de0){var pi=lt[ae-1],mi=l[pi.a],hn=l[pi.b];mi.size=de[ae-1],hn.size=we,H(mi.element,mi.size,pi[Ko],mi.i),H(hn.element,hn.size,pi[ka],hn.i)}})}function Nn(Ie,de){lt.forEach(function(we){if(de!==!0?we.parent.removeChild(we.gutter):(we.gutter[jo]("mousedown",we[_f]),we.gutter[jo]("touchstart",we[_f])),Ie!==!0){var ae=B(i,we.a.size,we[Ko]);Object.keys(ae).forEach(function(pi){l[we.a].element.style[pi]="",l[we.b].element.style[pi]=""})}})}return{setSizes:wi,getSizes:he,collapse:function(de){Mi(l[de])},destroy:Nn,parent:d,pairs:lt}};const CU={class:"border-b border-gray-200 dark:border-gray-700 text-sm flex justify-start bg-[#EFF1F4] dark:bg-black-h h-10"},wU=["onClick"],SU=Oc({__name:"Tabs",props:{modelValue:null,items:null},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=KL(s=>{i("update:modelValue",s)},500,{leading:!0,trailing:!1});return(s,o)=>(En(),eo("div",CU,[(En(!0),eo(QO,null,JO(r.items,a=>(En(),eo("div",{key:a.value,class:eP(t.modelValue===a.value?"tab-item inline-block px-4 py-2 border-t-2 border-indigo-500 text-indigo-500 font-semibold":"tab-item inline-block px-4 py-2 text-gray-700 dark:text-gray-200 hover:text-indigo-500 dark:hover:text-indigo-400"),onClick:Y3(l=>Bt(n)(a.value),["self"])},X3(a.text),11,wU))),128))]))}});const yU=Oc({components:{CloseOutlined:oz},props:{plugins:{type:String,default:""}},emits:["pluginList"],setup(r,{emit:e}){const t=Ii({0:{url:"./logicflow/core.umd.js",isModule:!1,disabled:!0},1:{url:"./logicflow/extensionLib/NodeResize.js",isModule:!1,disabled:!0}}),i=()=>{const o=Object.keys(t.value).length;t.value[o]={url:"",isModule:!1,disabled:!1}},n=o=>{delete t.value[o],e("pluginList",JSON.stringify(Object.values(t.value)))},s=o=>{fp(()=>{e("pluginList",JSON.stringify(Object.values(t.value)))})};return dl(()=>r.plugins,o=>{o&&(t.value=JSON.parse(o)),e("pluginList",JSON.stringify(Object.values(t.value)))},{immediate:!0}),{pluginList:t,addNewPlugin:i,removePlugin:n,inputChange:s}}}),LU={class:"px-2 py-4"},DU={class:"justify-center items-center",style:{width:"30px",cursor:"pointer"}};function kU(r,e,t,i,n,s){const o=lz,a=cz,l=tP("CloseOutlined"),c=sP;return En(),eo("div",LU,[(En(!0),eo(QO,null,JO(r.pluginList,(d,h)=>(En(),eo("div",{key:h,class:"flex items-center mb-3"},[Ai(o,{value:d.url,"onUpdate:value":u=>d.url=u,placeholder:"js资源",disabled:d.disabled,style:{flex:"1"},onChange:r.inputChange},null,8,["value","onUpdate:value","disabled","onChange"]),Ai(a,{checked:d.isModule,"onUpdate:checked":u=>d.isModule=u,disabled:d.disabled,class:"justify-center",style:{width:"90px"}},{default:Oa(()=>e[0]||(e[0]=[pu(" 是模块 ")])),_:2},1032,["checked","onUpdate:checked","disabled"]),js("span",DU,[Ai(l,{style:{"vertical-align":"middle","font-size":"18px"},onClick:u=>r.removePlugin(h)},null,8,["onClick"])])]))),128)),Ai(c,{type:"primary",class:"mt-3 float-left",onClick:r.addNewPlugin},{default:Oa(()=>e[1]||(e[1]=[pu(" 新增 ")])),_:1},8,["onClick"])])}const xU=EI(yU,[["render",kU]]),_n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},Ml=8;class HP{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class zP{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class ti{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return Ow(e,t)}compute(e,t,i){return i}}class vp{constructor(e,t){this.newValue=e,this.didChange=t}}function Ow(r,e){if(typeof r!="object"||typeof e!="object"||!r||!e)return new vp(e,r!==e);if(Array.isArray(r)||Array.isArray(e)){const i=Array.isArray(r)&&Array.isArray(e)&&Pn(r,e);return new vp(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=Ow(r[i],e[i]);n.didChange&&(r[i]=n.newValue,t=!0)}return new vp(r,t)}class h_{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return Ow(e,t)}validate(e){return this.defaultValue}}class Zg{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return Ow(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function Le(r,e){return typeof r>"u"?e:r==="false"?!1:!!r}class ct extends Zg{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return Le(e,this.defaultValue)}}function QL(r,e,t,i){if(typeof r>"u")return e;let n=parseInt(r,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class Dt extends Zg{static clampedInt(e,t,i,n){return QL(e,t,i,n)}constructor(e,t,i,n,s,o=void 0){typeof o<"u"&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s),super(e,t,i,o),this.minimum=n,this.maximum=s}validate(e){return Dt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class Yr extends Zg{static clamp(e,t,i){return ei?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(Yr.float(e,this.defaultValue))}}class cs extends Zg{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return cs.string(e,this.defaultValue)}}function ki(r,e,t){return typeof r!="string"||t.indexOf(r)===-1?e:r}class di extends Zg{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return ki(e,this.defaultValue,this._allowedValues)}}class nv extends ti{constructor(e,t,i,n,s,o,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=o}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function IU(r){switch(r){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class EU extends ti{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[f("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),f("accessibilitySupport.on","Optimize for usage with a Screen Reader"),f("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:f("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,i){return i===0?e.accessibilitySupport:i}}class TU extends ti{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(20,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:f("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:f("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:Le(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Le(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function NU(r){switch(r){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Gi;(function(r){r[r.Line=1]="Line",r[r.Block=2]="Block",r[r.Underline=3]="Underline",r[r.LineThin=4]="LineThin",r[r.BlockOutline=5]="BlockOutline",r[r.UnderlineThin=6]="UnderlineThin"})(Gi||(Gi={}));function MU(r){switch(r){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 RU extends h_{constructor(){super(135)}compute(e,t,i){const n=["monaco-editor"];return t.get(36)&&n.push(t.get(36)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(70)==="default"?n.push("mouse-default"):t.get(70)==="copy"&&n.push("mouse-copy"),t.get(105)&&n.push("showUnused"),t.get(133)&&n.push("showDeprecated"),n.join(" ")}}class AU extends ct{constructor(){super(34,"emptySelectionClipboard",!0,{description:f("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class OU extends ti{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(38,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:f("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:[f("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),f("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),f("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:f("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:[f("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),f("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),f("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:f("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:f("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Je},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:f("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:f("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:Le(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":ki(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":ki(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Le(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Le(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Le(t.loop,this.defaultValue.loop)}}}class xs extends ti{constructor(){super(48,"fontLigatures",xs.OFF,{anyOf:[{type:"boolean",description:f("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:f("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:f("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"?xs.OFF:e==="true"?xs.ON:e:e?xs.ON:xs.OFF}}xs.OFF='"liga" off, "calt" off';xs.ON='"liga" on, "calt" on';class or extends ti{constructor(){super(51,"fontVariations",or.OFF,{anyOf:[{type:"boolean",description:f("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:f("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:f("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"?or.OFF:e==="true"?or.TRANSLATE:e:e?or.TRANSLATE:or.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}or.OFF="normal";or.TRANSLATE="translate";class PU extends h_{constructor(){super(47)}compute(e,t,i){return e.fontInfo}}class FU extends Zg{constructor(){super(49,"fontSize",fs.fontSize,{type:"number",minimum:6,maximum:100,default:fs.fontSize,description:f("fontSize","Controls the font size in pixels.")})}validate(e){const t=Yr.float(e,this.defaultValue);return t===0?fs.fontSize:Yr.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class zr extends ti{constructor(){super(50,"fontWeight",fs.fontWeight,{anyOf:[{type:"number",minimum:zr.MINIMUM_VALUE,maximum:zr.MAXIMUM_VALUE,errorMessage:f("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:zr.SUGGESTION_VALUES}],default:fs.fontWeight,description:f("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(Dt.clampedInt(e,fs.fontWeight,zr.MINIMUM_VALUE,zr.MAXIMUM_VALUE))}}zr.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];zr.MINIMUM_VALUE=1;zr.MAXIMUM_VALUE=1e3;class BU extends ti{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:[f("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),f("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),f("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","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(55,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:f("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":Object.assign({description:f("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:f("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:f("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:f("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:f("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:i,description:f("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:i,description:f("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:i,description:f("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:i,description:f("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:i,description:f("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,o;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:ki(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:ki(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:ki(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:ki(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:ki(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(o=a.multipleReferences)!==null&&o!==void 0?o:ki(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:cs.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:cs.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:cs.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:cs.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:cs.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class WU extends ti{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(57,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:f("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:f("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:f("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:f("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:Le(t.enabled,this.defaultValue.enabled),delay:Dt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Le(t.sticky,this.defaultValue.sticky),above:Le(t.above,this.defaultValue.above)}}}class Hu extends h_{constructor(){super(138)}compute(e,t,i){return Hu.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})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:o}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=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(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const o=t.stableMinimapLayoutInput,a=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.paddingTop===o.paddingTop&&e.paddingBottom===o.paddingBottom&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,_=e.verticalScrollbarWidth,b=e.viewLineCount,v=e.remainingWidth,C=e.isViewportWrapping,w=h?2:3;let L=Math.floor(s*n);const T=L/s;let y=!1,D=!1,N=w*u,R=u/s,B=1;if(p==="fill"||p==="fit"){const{typicalViewportLineCount:We,extraLinesBeforeFirstLine:xe,extraLinesBeyondLastLine:qe,desiredRatio:Ye,minimapLineCount:fe}=Hu.computeContainedMinimapLineCount({viewLineCount:b,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(b/fe>1)y=!0,D=!0,u=1,N=1,R=u/s;else{let lt=!1,Mi=u+1;if(p==="fit"){const wi=Math.ceil((xe+b+qe)*N);C&&a&&v<=t.stableFitRemainingWidth?(lt=!0,Mi=t.stableFitMaxMinimapScale):lt=wi>L}if(p==="fill"||lt){y=!0;const wi=u;N=Math.min(l*s,Math.max(1,Math.floor(1/Ye))),C&&a&&v<=t.stableFitRemainingWidth&&(Mi=t.stableFitMaxMinimapScale),u=Math.min(Mi,Math.max(1,Math.floor(N/w))),u>wi&&(B=Math.min(2,u/wi)),R=u/s/B,L=Math.ceil(Math.max(We,xe+b+qe)*N),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const U=Math.floor(g*R),H=Math.min(U,Math.max(0,Math.floor((v-_-2)*R/(c+R)))+Ml);let ie=Math.floor(s*H);const he=ie/s;ie=Math.floor(ie*B);const _e=h?1:2,Me=m==="left"?0:i-H-_;return{renderMinimap:_e,minimapLeft:Me,minimapWidth:H,minimapHeightIsEditorHeight:y,minimapIsSampling:D,minimapScale:u,minimapLineHeight:N,minimapCanvasInnerWidth:ie,minimapCanvasInnerHeight:L,minimapCanvasOuterWidth:he,minimapCanvasOuterHeight:T}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,o=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,h=e.get(130),u=h==="inherit"?e.get(129):h,g=u==="inherit"?e.get(125):u,p=e.get(128),m=t.isDominatedByLongLines,_=e.get(54),b=e.get(64).renderType!==0,v=e.get(65),C=e.get(99),w=e.get(80),L=e.get(69),T=e.get(97),y=T.verticalScrollbarSize,D=T.verticalHasArrows,N=T.arrowSize,R=T.horizontalScrollbarSize,B=e.get(40),U=e.get(104)!=="never";let H=e.get(62);B&&U&&(H+=16);let ie=0;if(b){const Ie=Math.max(o,v);ie=Math.round(Ie*l)}let he=0;_&&(he=s);let _e=0,Me=_e+he,We=Me+ie,xe=We+H;const qe=i-he-ie-H;let Ye=!1,fe=!1,Ce=-1;u==="inherit"&&m?(Ye=!0,fe=!0):g==="on"||g==="bounded"?fe=!0:g==="wordWrapColumn"&&(Ce=p);const lt=Hu._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:C,paddingTop:w.top,paddingBottom:w.bottom,minimap:L,verticalScrollbarWidth:y,viewLineCount:d,remainingWidth:qe,isViewportWrapping:fe},t.memory||new zP);lt.renderMinimap!==0&<.minimapLeft===0&&(_e+=lt.minimapWidth,Me+=lt.minimapWidth,We+=lt.minimapWidth,xe+=lt.minimapWidth);const Mi=qe-lt.minimapWidth,wi=Math.max(1,Math.floor((Mi-y-2)/a)),Nn=D?N:0;return fe&&(Ce=Math.max(1,wi),g==="bounded"&&(Ce=Math.min(Ce,p))),{width:i,height:n,glyphMarginLeft:_e,glyphMarginWidth:he,lineNumbersLeft:Me,lineNumbersWidth:ie,decorationsLeft:We,decorationsWidth:H,contentLeft:xe,contentWidth:Mi,minimap:lt,viewportColumn:wi,isWordWrapMinified:Ye,isViewportWrapping:fe,wrappingColumn:Ce,verticalScrollbarWidth:y,horizontalScrollbarHeight:R,overviewRuler:{top:Nn,width:y,height:n-2*Nn,right:0}}}}class VU extends ti{constructor(){super(132,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[f("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."),f("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:f("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 ki(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}}class HU extends ti{constructor(){const e={enabled:!0};super(61,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:f("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Le(e.enabled,this.defaultValue.enabled)}}}class zU extends ti{constructor(){const e={enabled:!1,maxLineCount:5};super(109,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:f("editor.stickyScroll","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:f("editor.stickyScroll.","Defines the maximum number of sticky lines to show.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Le(t.enabled,this.defaultValue.enabled),maxLineCount:Dt.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10)}}}class UU extends ti{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(134,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:f("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[f("editor.inlayHints.on","Inlay hints are enabled"),f("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",Je?"Ctrl+Option":"Ctrl+Alt"),f("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",Je?"Ctrl+Option":"Ctrl+Alt"),f("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:f("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:f("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:f("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:ki(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Dt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:cs.string(t.fontFamily,this.defaultValue.fontFamily),padding:Le(t.padding,this.defaultValue.padding)}}}class $U extends ti{constructor(){super(62,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Dt.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?Dt.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class jU extends Yr{constructor(){super(63,"lineHeight",fs.lineHeight,e=>Yr.clamp(e,0,150),{markdownDescription:f("lineHeight",`Controls the line height. - Use 0 to automatically compute the line height from the font size. - Values between 0 and 8 will be used as a multiplier with the font size. - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class KU extends ti{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(69,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:f("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:f("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[f("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),f("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),f("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:f("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:f("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:f("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:f("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:f("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:f("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:Le(t.enabled,this.defaultValue.enabled),autohide:Le(t.autohide,this.defaultValue.autohide),size:ki(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:ki(t.side,this.defaultValue.side,["right","left"]),showSlider:ki(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Le(t.renderCharacters,this.defaultValue.renderCharacters),scale:Dt.clampedInt(t.scale,1,1,3),maxColumn:Dt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function qU(r){return r==="ctrlCmd"?Je?"metaKey":"ctrlKey":"altKey"}class GU extends ti{constructor(){super(80,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:f("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:f("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:Dt.clampedInt(t.top,0,0,1e3),bottom:Dt.clampedInt(t.bottom,0,0,1e3)}}}class ZU extends ti{constructor(){const e={enabled:!0,cycle:!0};super(81,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:f("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:f("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:Le(t.enabled,this.defaultValue.enabled),cycle:Le(t.cycle,this.defaultValue.cycle)}}}class YU extends h_{constructor(){super(136)}compute(e,t,i){return e.pixelRatio}}class XU extends ti{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[f("on","Quick suggestions show inside the suggest widget"),f("inline","Quick suggestions show as ghost text"),f("off","Quick suggestions are disabled")]}];super(84,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:f("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:f("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:f("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:f("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:i,strings:n}=e,s=["on","inline","off"];let o,a,l;return typeof t=="boolean"?o=t?"on":"off":o=ki(t,this.defaultValue.other,s),typeof i=="boolean"?a=i?"on":"off":a=ki(i,this.defaultValue.comments,s),typeof n=="boolean"?l=n?"on":"off":l=ki(n,this.defaultValue.strings,s),{other:o,comments:a,strings:l}}}class QU extends ti{constructor(){super(64,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[f("lineNumbers.off","Line numbers are not rendered."),f("lineNumbers.on","Line numbers are rendered as absolute number."),f("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),f("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:f("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function Zb(r){const e=r.get(92);return e==="editable"?r.get(86):e!=="on"}class JU extends ti{constructor(){const e=[],t={type:"number",description:f("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(96,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:f("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:f("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 i of e)if(typeof i=="number")t.push({column:Dt.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:Dt.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}function G1(r,e){if(typeof r!="string")return e;switch(r){case"hidden":return 2;case"visible":return 3;default:return 1}}let e$=class extends ti{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};super(97,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[f("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),f("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),f("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:f("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[f("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),f("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),f("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:f("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:f("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:f("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:f("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=Dt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Dt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Dt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:G1(t.vertical,this.defaultValue.vertical),horizontal:G1(t.horizontal,this.defaultValue.horizontal),useShadows:Le(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Le(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Le(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Le(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Le(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Dt.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Dt.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Le(t.scrollByPage,this.defaultValue.scrollByPage)}}};const ys="inUntrustedWorkspace",Yn={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 t$ extends ti{constructor(){const e={nonBasicASCII:ys,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:ys,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(119,"unicodeHighlight",e,{[Yn.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ys],default:e.nonBasicASCII,description:f("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.")},[Yn.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:f("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Yn.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:f("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.")},[Yn.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ys],default:e.includeComments,description:f("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Yn.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,ys],default:e.includeStrings,description:f("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Yn.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:f("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Yn.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:f("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(hl(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&e&&(hl(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new vp(n.newValue,!0):n}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:zu(t.nonBasicASCII,ys,[!0,!1,ys]),invisibleCharacters:Le(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Le(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:zu(t.includeComments,ys,[!0,!1,ys]),includeStrings:zu(t.includeStrings,ys,[!0,!1,ys]),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 i={};for(const[n,s]of Object.entries(e))s===!0&&(i[n]=!0);return i}}class i$ extends ti{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover"};super(59,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:f("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[f("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),f("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:f("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Le(t.enabled,this.defaultValue.enabled),mode:ki(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:ki(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"])}}}class n$ extends ti{constructor(){const e={enabled:_n.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:_n.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:f("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:f("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:Le(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Le(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class s$ extends ti{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[f("editor.guides.bracketPairs.true","Enables bracket pair guides."),f("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),f("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:f("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[f("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),f("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),f("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:f("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:f("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:f("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[f("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),f("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),f("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:f("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:zu(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:zu(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Le(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Le(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:zu(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function zu(r,e,t){const i=t.indexOf(r);return i===-1?e:t[i]}class o$ extends ti{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,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(112,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[f("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),f("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:f("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:f("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:f("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:f("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:[f("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),f("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),f("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),f("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:f("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:f("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:f("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:f("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:f("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:f("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:f("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:f("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:f("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:f("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:f("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:f("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:ki(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Le(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Le(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Le(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Le(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:ki(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Le(t.showIcons,this.defaultValue.showIcons),showStatusBar:Le(t.showStatusBar,this.defaultValue.showStatusBar),preview:Le(t.preview,this.defaultValue.preview),previewMode:ki(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Le(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Le(t.showMethods,this.defaultValue.showMethods),showFunctions:Le(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Le(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Le(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Le(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Le(t.showFields,this.defaultValue.showFields),showVariables:Le(t.showVariables,this.defaultValue.showVariables),showClasses:Le(t.showClasses,this.defaultValue.showClasses),showStructs:Le(t.showStructs,this.defaultValue.showStructs),showInterfaces:Le(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Le(t.showModules,this.defaultValue.showModules),showProperties:Le(t.showProperties,this.defaultValue.showProperties),showEvents:Le(t.showEvents,this.defaultValue.showEvents),showOperators:Le(t.showOperators,this.defaultValue.showOperators),showUnits:Le(t.showUnits,this.defaultValue.showUnits),showValues:Le(t.showValues,this.defaultValue.showValues),showConstants:Le(t.showConstants,this.defaultValue.showConstants),showEnums:Le(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Le(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Le(t.showKeywords,this.defaultValue.showKeywords),showWords:Le(t.showWords,this.defaultValue.showWords),showColors:Le(t.showColors,this.defaultValue.showColors),showFiles:Le(t.showFiles,this.defaultValue.showFiles),showReferences:Le(t.showReferences,this.defaultValue.showReferences),showFolders:Le(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Le(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Le(t.showSnippets,this.defaultValue.showSnippets),showUsers:Le(t.showUsers,this.defaultValue.showUsers),showIssues:Le(t.showIssues,this.defaultValue.showIssues)}}}class r$ extends ti{constructor(){super(107,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:f("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Le(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class a$ extends ti{constructor(){super(131,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[f("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),f("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),f("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),f("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:f("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,i){return t.get(2)===2?0:i}}class l$ extends h_{constructor(){super(139)}compute(e,t,i){const n=t.get(138);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class c$ extends ti{constructor(){const e={enabled:!0};super(33,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:f("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Le(e.enabled,this.defaultValue.enabled)}}}const d$="Consolas, 'Courier New', monospace",h$="Menlo, Monaco, 'Courier New', monospace",u$="'Droid Sans Mono', 'monospace', monospace",fs={fontFamily:Je?h$:ln?u$:d$,fontWeight:"normal",fontSize:Je?12:14,lineHeight:0,letterSpacing:0},Cu=[];function Q(r){return Cu[r.id]=r,r}const yr={acceptSuggestionOnCommitCharacter:Q(new ct(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:f("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:Q(new di(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",f("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:f("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:Q(new EU),accessibilityPageSize:Q(new Dt(3,"accessibilityPageSize",10,1,1073741824,{description:f("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:Q(new cs(4,"ariaLabel",f("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:Q(new di(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",f("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),f("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:f("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:Q(new di(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",f("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:f("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Q(new di(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",f("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:f("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Q(new di(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",f("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),f("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:f("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Q(new nv(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],IU,{enumDescriptions:[f("editor.autoIndent.none","The editor will not insert indentation automatically."),f("editor.autoIndent.keep","The editor will keep the current line's indentation."),f("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),f("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),f("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:f("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Q(new ct(10,"automaticLayout",!1)),autoSurround:Q(new di(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[f("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),f("editor.autoSurround.quotes","Surround with quotes but not brackets."),f("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:f("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Q(new n$),bracketPairGuides:Q(new s$),stickyTabStops:Q(new ct(110,"stickyTabStops",!1,{description:f("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Q(new ct(14,"codeLens",!0,{description:f("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Q(new cs(15,"codeLensFontFamily","",{description:f("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Q(new Dt(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:f("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Q(new ct(17,"colorDecorators",!0,{description:f("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorsLimit:Q(new Dt(18,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:f("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Q(new ct(19,"columnSelection",!1,{description:f("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Q(new TU),contextmenu:Q(new ct(21,"contextmenu",!0)),copyWithSyntaxHighlighting:Q(new ct(22,"copyWithSyntaxHighlighting",!0,{description:f("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Q(new nv(23,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],NU,{description:f("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Q(new di(24,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[f("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),f("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),f("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:f("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Q(new nv(25,"cursorStyle",Gi.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],MU,{description:f("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Q(new Dt(26,"cursorSurroundingLines",0,0,1073741824,{description:f("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:Q(new di(27,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[f("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),f("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:f("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:Q(new Dt(28,"cursorWidth",0,0,1073741824,{markdownDescription:f("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Q(new ct(29,"disableLayerHinting",!1)),disableMonospaceOptimizations:Q(new ct(30,"disableMonospaceOptimizations",!1)),domReadOnly:Q(new ct(31,"domReadOnly",!1)),dragAndDrop:Q(new ct(32,"dragAndDrop",!0,{description:f("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Q(new AU),dropIntoEditor:Q(new c$),stickyScroll:Q(new zU),experimentalWhitespaceRendering:Q(new di(35,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[f("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),f("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),f("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:f("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Q(new cs(36,"extraEditorClassName","")),fastScrollSensitivity:Q(new Yr(37,"fastScrollSensitivity",5,r=>r<=0?5:r,{markdownDescription:f("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Q(new OU),fixedOverflowWidgets:Q(new ct(39,"fixedOverflowWidgets",!1)),folding:Q(new ct(40,"folding",!0,{description:f("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Q(new di(41,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[f("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),f("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:f("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Q(new ct(42,"foldingHighlight",!0,{description:f("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Q(new ct(43,"foldingImportsByDefault",!1,{description:f("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Q(new Dt(44,"foldingMaximumRegions",5e3,10,65e3,{description:f("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:Q(new ct(45,"unfoldOnClickAfterEndOfLine",!1,{description:f("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Q(new cs(46,"fontFamily",fs.fontFamily,{description:f("fontFamily","Controls the font family.")})),fontInfo:Q(new PU),fontLigatures2:Q(new xs),fontSize:Q(new FU),fontWeight:Q(new zr),fontVariations:Q(new or),formatOnPaste:Q(new ct(52,"formatOnPaste",!1,{description:f("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:Q(new ct(53,"formatOnType",!1,{description:f("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Q(new ct(54,"glyphMargin",!0,{description:f("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Q(new BU),hideCursorInOverviewRuler:Q(new ct(56,"hideCursorInOverviewRuler",!1,{description:f("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Q(new WU),inDiffEditor:Q(new ct(58,"inDiffEditor",!1)),letterSpacing:Q(new Yr(60,"letterSpacing",fs.letterSpacing,r=>Yr.clamp(r,-5,20),{description:f("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Q(new HU),lineDecorationsWidth:Q(new $U),lineHeight:Q(new jU),lineNumbers:Q(new QU),lineNumbersMinChars:Q(new Dt(65,"lineNumbersMinChars",5,1,300)),linkedEditing:Q(new ct(66,"linkedEditing",!1,{description:f("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Q(new ct(67,"links",!0,{description:f("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Q(new di(68,"matchBrackets","always",["always","near","never"],{description:f("matchBrackets","Highlight matching brackets.")})),minimap:Q(new KU),mouseStyle:Q(new di(70,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Q(new Yr(71,"mouseWheelScrollSensitivity",1,r=>r===0?1:r,{markdownDescription:f("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Q(new ct(72,"mouseWheelZoom",!1,{markdownDescription:f("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Q(new ct(73,"multiCursorMergeOverlapping",!0,{description:f("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Q(new nv(74,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],qU,{markdownEnumDescriptions:[f("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),f("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:f({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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:Q(new di(75,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[f("multiCursorPaste.spread","Each cursor pastes a single line of the text."),f("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:f("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Q(new Dt(76,"multiCursorLimit",1e4,1,1e5,{markdownDescription:f("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Q(new ct(77,"occurrencesHighlight",!0,{description:f("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Q(new ct(78,"overviewRulerBorder",!0,{description:f("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Q(new Dt(79,"overviewRulerLanes",3,0,3)),padding:Q(new GU),parameterHints:Q(new ZU),peekWidgetDefaultFocus:Q(new di(82,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[f("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),f("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:f("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Q(new ct(83,"definitionLinkOpensInPeek",!1,{description:f("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Q(new XU),quickSuggestionsDelay:Q(new Dt(85,"quickSuggestionsDelay",10,0,1073741824,{description:f("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Q(new ct(86,"readOnly",!1)),renameOnType:Q(new ct(87,"renameOnType",!1,{description:f("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:f("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Q(new ct(88,"renderControlCharacters",!0,{description:f("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Q(new di(89,"renderFinalNewline",ln?"dimmed":"on",["off","on","dimmed"],{description:f("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Q(new di(90,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",f("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:f("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Q(new ct(91,"renderLineHighlightOnlyWhenFocus",!1,{description:f("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Q(new di(92,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Q(new di(93,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",f("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),f("renderWhitespace.selection","Render whitespace characters only on selected text."),f("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:f("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Q(new Dt(94,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Q(new ct(95,"roundedSelection",!0,{description:f("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Q(new JU),scrollbar:Q(new e$),scrollBeyondLastColumn:Q(new Dt(98,"scrollBeyondLastColumn",4,0,1073741824,{description:f("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Q(new ct(99,"scrollBeyondLastLine",!0,{description:f("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Q(new ct(100,"scrollPredominantAxis",!0,{description:f("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:Q(new ct(101,"selectionClipboard",!0,{description:f("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:ln})),selectionHighlight:Q(new ct(102,"selectionHighlight",!0,{description:f("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Q(new ct(103,"selectOnLineNumbers",!0)),showFoldingControls:Q(new di(104,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[f("showFoldingControls.always","Always show the folding controls."),f("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),f("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:f("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Q(new ct(105,"showUnused",!0,{description:f("showUnused","Controls fading out of unused code.")})),showDeprecated:Q(new ct(133,"showDeprecated",!0,{description:f("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Q(new UU),snippetSuggestions:Q(new di(106,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[f("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),f("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),f("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),f("snippetSuggestions.none","Do not show snippet suggestions.")],description:f("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Q(new r$),smoothScrolling:Q(new ct(108,"smoothScrolling",!1,{description:f("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Q(new Dt(111,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Q(new o$),inlineSuggest:Q(new i$),suggestFontSize:Q(new Dt(113,"suggestFontSize",0,0,1e3,{markdownDescription:f("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Q(new Dt(114,"suggestLineHeight",0,0,1e3,{markdownDescription:f("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:Q(new ct(115,"suggestOnTriggerCharacters",!0,{description:f("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Q(new di(116,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[f("suggestSelection.first","Always select the first suggestion."),f("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),f("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:f("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Q(new di(117,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[f("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),f("tabCompletion.off","Disable tab completions."),f("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:f("tabCompletion","Enables tab completions.")})),tabIndex:Q(new Dt(118,"tabIndex",0,-1,1073741824)),unicodeHighlight:Q(new t$),unusualLineTerminators:Q(new di(120,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[f("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),f("unusualLineTerminators.off","Unusual line terminators are ignored."),f("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:f("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Q(new ct(121,"useShadowDOM",!0)),useTabStops:Q(new ct(122,"useTabStops",!0,{description:f("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:Q(new di(123,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[f("wordBreak.normal","Use the default line break rule."),f("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:f("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:Q(new cs(124,"wordSeparators",fz,{description:f("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Q(new di(125,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[f("wordWrap.off","Lines will never wrap."),f("wordWrap.on","Lines will wrap at the viewport width."),f({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),f({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:f({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Q(new cs(126,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Q(new cs(127,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Q(new Dt(128,"wordWrapColumn",80,1,1073741824,{markdownDescription:f({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Q(new di(129,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Q(new di(130,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Q(new RU),pixelRatio:Q(new YU),tabFocusMode:Q(new ct(137,"tabFocusMode",!1,{markdownDescription:f("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Q(new Hu),wrappingInfo:Q(new l$),wrappingIndent:Q(new a$),wrappingStrategy:Q(new VU)};class JL{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}JL.INSTANCE=new JL;class g$ extends V{constructor(){super(),this._onDidChange=this._register(new A),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;(t=this._mediaQueryList)===null||t===void 0||t.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class f$ extends V{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new A),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new g$);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}}class p${constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=rP(new f$)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function KI(r,e){typeof r=="string"&&(r=window.matchMedia(r)),r.addEventListener("change",e)}const hg=new p$;function UP(){return JL.INSTANCE.getZoomFactor()}const Yg=navigator.userAgent,no=Yg.indexOf("Firefox")>=0,ic=Yg.indexOf("AppleWebKit")>=0,qI=Yg.indexOf("Chrome")>=0,gl=!qI&&Yg.indexOf("Safari")>=0,GI=!qI&&!gl&&ic,m$=Yg.indexOf("Electron/")>=0,$P=Yg.indexOf("Android")>=0;let fb=!1;if(window.matchMedia){const r=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=window.matchMedia("(display-mode: fullscreen)");fb=r.matches,KI(r,({matches:t})=>{fb&&e.matches||(fb=t)})}function ZI(){return fb}const _$=Object.freeze(Object.defineProperty({__proto__:null,PixelRatio:hg,addMatchMediaChangeListener:KI,getZoomFactor:UP,isAndroid:$P,isChrome:qI,isElectron:m$,isFirefox:no,isSafari:gl,isStandalone:ZI,isWebKit:ic,isWebkitWebView:GI},Symbol.toStringTag,{value:"Module"}));class jP{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=Go(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=Go(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=Go(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=Go(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=Go(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=Go(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=Go(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=Go(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=Go(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=Go(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=Go(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function Go(r){return typeof r=="number"?`${r}px`:r}function dt(r){return new jP(r)}function Xi(r,e){r instanceof jP?(r.setFontFamily(e.getMassagedFontFamily()),r.setFontWeight(e.fontWeight),r.setFontSize(e.fontSize),r.setFontFeatureSettings(e.fontFeatureSettings),r.setFontVariationSettings(e.fontVariationSettings),r.setLineHeight(e.lineHeight),r.setLetterSpacing(e.letterSpacing)):(r.style.fontFamily=e.getMassagedFontFamily(),r.style.fontWeight=e.fontWeight,r.style.fontSize=e.fontSize+"px",r.style.fontFeatureSettings=e.fontFeatureSettings,r.style.fontVariationSettings=e.fontVariationSettings,r.style.lineHeight=e.lineHeight+"px",r.style.letterSpacing=e.letterSpacing+"px")}class v${constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class YI{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");Xi(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");Xi(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");Xi(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const o of this._requests){let a;o.type===0&&(a=t),o.type===2&&(a=i),o.type===1&&(a=n),a.appendChild(document.createElement("br"));const l=document.createElement("span");YI._render(l,o),a.appendChild(l),s.push(l)}this._container=e,this._testElements=s}static _render(e,t){if(t.chr===" "){let i=" ";for(let n=0;n<8;n++)i+=i;e.innerText=i}else{let i=t.chr;for(let n=0;n<8;n++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new eD({pixelRatio:hg.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const s=new v$(e,t);return i.push(s),n==null||n.push(s),s}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),s=this._createRequest("m",0,t,null),o=this._createRequest(" ",0,t,i),a=this._createRequest("0",0,t,i),l=this._createRequest("1",0,t,i),c=this._createRequest("2",0,t,i),d=this._createRequest("3",0,t,i),h=this._createRequest("4",0,t,i),u=this._createRequest("5",0,t,i),g=this._createRequest("6",0,t,i),p=this._createRequest("7",0,t,i),m=this._createRequest("8",0,t,i),_=this._createRequest("9",0,t,i),b=this._createRequest("→",0,t,i),v=this._createRequest("→",0,t,null),C=this._createRequest("·",0,t,i),w=this._createRequest(String.fromCharCode(11825),0,t,null),L="|/-_ilm%";for(let R=0,B=L.length;R.001){y=!1;break}}let N=!0;return y&&v.width!==D&&(N=!1),v.width>b.width&&(N=!1),new eD({pixelRatio:hg.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:o.width,middotWidth:C.width,wsmiddotWidth:w.width,maxDigitWidth:T},!0)}}class Z1{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const tD=new S$;var ar;(function(r){r.serviceIds=new Map,r.DI_TARGET="$di$target",r.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[r.DI_DEPENDENCIES]||[]}r.getServiceDependencies=e})(ar||(ar={}));const Pe=tt("instantiationService");function y$(r,e,t){e[ar.DI_TARGET]===e?e[ar.DI_DEPENDENCIES].push({id:r,index:t}):(e[ar.DI_DEPENDENCIES]=[{id:r,index:t}],e[ar.DI_TARGET]=e)}function tt(r){if(ar.serviceIds.has(r))return ar.serviceIds.get(r);const e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");y$(e,t,n)};return e.toString=()=>r,ar.serviceIds.set(r,e),e}const pt=tt("codeEditorService"),XI=tt("audioCue");class vt{static register(e){return new vt(e.fileName)}constructor(e){this.fileName=e}}vt.error=vt.register({fileName:"error.mp3"});vt.warning=vt.register({fileName:"warning.mp3"});vt.foldedArea=vt.register({fileName:"foldedAreas.mp3"});vt.break=vt.register({fileName:"break.mp3"});vt.quickFixes=vt.register({fileName:"quickFixes.mp3"});vt.taskCompleted=vt.register({fileName:"taskCompleted.mp3"});vt.taskFailed=vt.register({fileName:"taskFailed.mp3"});vt.terminalBell=vt.register({fileName:"terminalBell.mp3"});vt.diffLineInserted=vt.register({fileName:"diffLineInserted.mp3"});vt.diffLineDeleted=vt.register({fileName:"diffLineDeleted.mp3"});vt.diffLineModified=vt.register({fileName:"diffLineModified.mp3"});class _t{static register(e){const t=new _t(e.sound,e.name,e.settingsKey);return _t._audioCues.add(t),t}constructor(e,t,i){this.sound=e,this.name=t,this.settingsKey=i}}_t._audioCues=new Set;_t.error=_t.register({name:f("audioCues.lineHasError.name","Error on Line"),sound:vt.error,settingsKey:"audioCues.lineHasError"});_t.warning=_t.register({name:f("audioCues.lineHasWarning.name","Warning on Line"),sound:vt.warning,settingsKey:"audioCues.lineHasWarning"});_t.foldedArea=_t.register({name:f("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:vt.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"});_t.break=_t.register({name:f("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:vt.break,settingsKey:"audioCues.lineHasBreakpoint"});_t.inlineSuggestion=_t.register({name:f("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:vt.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"});_t.terminalQuickFix=_t.register({name:f("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:vt.quickFixes,settingsKey:"audioCues.terminalQuickFix"});_t.onDebugBreak=_t.register({name:f("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:vt.break,settingsKey:"audioCues.onDebugBreak"});_t.noInlayHints=_t.register({name:f("audioCues.noInlayHints","No Inlay Hints on Line"),sound:vt.error,settingsKey:"audioCues.noInlayHints"});_t.taskCompleted=_t.register({name:f("audioCues.taskCompleted","Task Completed"),sound:vt.taskCompleted,settingsKey:"audioCues.taskCompleted"});_t.taskFailed=_t.register({name:f("audioCues.taskFailed","Task Failed"),sound:vt.taskFailed,settingsKey:"audioCues.taskFailed"});_t.terminalCommandFailed=_t.register({name:f("audioCues.terminalCommandFailed","Terminal Command Failed"),sound:vt.taskFailed,settingsKey:"audioCues.terminalCommandFailed"});_t.terminalBell=_t.register({name:f("audioCues.terminalBell","Terminal Bell"),sound:vt.terminalBell,settingsKey:"audioCues.terminalBell"});_t.notebookCellCompleted=_t.register({name:f("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:vt.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"});_t.notebookCellFailed=_t.register({name:f("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:vt.taskFailed,settingsKey:"audioCues.notebookCellFailed"});_t.diffLineInserted=_t.register({name:f("audioCues.diffLineInserted","Diff Line Inserted"),sound:vt.diffLineInserted,settingsKey:"audioCues.diffLineInserted"});_t.diffLineDeleted=_t.register({name:f("audioCues.diffLineDeleted","Diff Line Deleted"),sound:vt.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"});_t.diffLineModified=_t.register({name:f("audioCues.diffLineModified","Diff Line Modified"),sound:vt.diffLineModified,settingsKey:"audioCues.diffLineModified"});const wn=new Map;wn.set("false",!1);wn.set("true",!0);wn.set("isMac",Je);wn.set("isLinux",ln);wn.set("isWindows",ts);wn.set("isWeb",Dh);wn.set("isMacNative",Je&&!Dh);wn.set("isEdge",pz);wn.set("isFirefox",mz);wn.set("isChrome",_z);wn.set("isSafari",vz);const L$=Object.prototype.hasOwnProperty;class ne{static has(e){return _c.create(e)}static equals(e,t){return ug.create(e,t)}static regex(e,t){return Yb.create(e,t)}static not(e){return jd.create(e)}static and(...e){return jl.create(e,null,!0)}static or(...e){return Ur.create(e,null,!0)}static deserialize(e){if(e)return this._deserializeOrExpression(e)}static _deserializeOrExpression(e){const t=e.split("||");return Ur.create(t.map(i=>this._deserializeAndExpression(i)),null,!0)}static _deserializeAndExpression(e){const t=e.split("&&");return jl.create(t.map(i=>this._deserializeOne(i)),null,!0)}static _deserializeOne(e){if(e=e.trim(),e.indexOf("!=")>=0){const t=e.split("!=");return Bw.create(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){const t=e.split("==");return ug.create(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("=~")>=0){const t=e.split("=~");return Yb.create(t[0].trim(),this._deserializeRegexValue(t[1]))}if(e.indexOf(" not in ")>=0){const t=e.split(" not in ");return Fw.create(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf(" in ")>=0){const t=e.split(" in ");return Pw.create(t[0].trim(),this._deserializeValue(t[1]))}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return Hw.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return Vw.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return Uw.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return zw.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?jd.create(e.substr(1).trim()):_c.create(e)}static _deserializeValue(e){if(e=e.trim(),e==="true")return!0;if(e==="false")return!1;const t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e}static _deserializeRegexValue(e){if(aP(e))return null;const t=e.indexOf("/"),i=e.lastIndexOf("/");if(t===i||t<0)return null;const n=e.slice(t+1,i),s=e[i+1]==="i"?"i":"";try{return new RegExp(n,s)}catch{return null}}}function D$(r,e){const t=r?r.substituteConstants():void 0,i=e?e.substituteConstants():void 0;return!t&&!i?!0:!t||!i?!1:t.equals(i)}function bp(r,e){return r.cmp(e)}class _s{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Ps.INSTANCE}}_s.INSTANCE=new _s;class Ps{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return _s.INSTANCE}}Ps.INSTANCE=new Ps;class _c{static create(e,t=null){const i=wn.get(e);return typeof i=="boolean"?i?Ps.INSTANCE:_s.INSTANCE:new _c(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:qP(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=wn.get(this.key);return typeof e=="boolean"?e?Ps.INSTANCE:_s.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=jd.create(this.key,this)),this.negated}}class ug{static create(e,t,i=null){if(typeof t=="boolean")return t?_c.create(e,i):jd.create(e,i);const n=wn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?Ps.INSTANCE:_s.INSTANCE:new ug(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:xh(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=wn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?Ps.INSTANCE:_s.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Bw.create(this.key,this.value,this)),this.negated}}class Pw{static create(e,t){return new Pw(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:xh(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):typeof i=="string"&&typeof t=="object"&&t!==null?L$.call(t,i):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=Fw.create(this.key,this.valueKey)),this.negated}}class Fw{static create(e,t){return new Fw(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=Pw.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class Bw{static create(e,t,i=null){if(typeof t=="boolean")return t?jd.create(e,i):_c.create(e,i);const n=wn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?_s.INSTANCE:Ps.INSTANCE:new Bw(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:xh(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=wn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?_s.INSTANCE:Ps.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ug.create(this.key,this.value,this)),this.negated}}class jd{static create(e,t=null){const i=wn.get(e);return typeof i=="boolean"?i?_s.INSTANCE:Ps.INSTANCE:new jd(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:qP(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=wn.get(this.key);return typeof e=="boolean"?e?_s.INSTANCE:Ps.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_c.create(this.key,this)),this.negated}}function Ww(r,e){if(typeof r=="string"){const t=parseFloat(r);isNaN(t)||(r=t)}return typeof r=="string"||typeof r=="number"?e(r):_s.INSTANCE}class Vw{static create(e,t,i=null){return Ww(t,n=>new Vw(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:xh(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Uw.create(this.key,this.value,this)),this.negated}}class Hw{static create(e,t,i=null){return Ww(t,n=>new Hw(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:xh(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=zw.create(this.key,this.value,this)),this.negated}}class zw{static create(e,t,i=null){return Ww(t,n=>new zw(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:xh(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new Uw(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:xh(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Vw.create(this.key,this.value,this)),this.negated}}class Yb{static create(e,t){return new Yb(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=QI.create(this)),this.negated}}class QI{static create(e){return new QI(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function KP(r){let e=null;for(let t=0,i=r.length;te.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const o=n[n.length-1];if(o.type!==9)break;n.pop();const a=n.pop(),l=n.length===0,c=Ur.create(o.expr.map(d=>jl.create([d,a],null,i)),null,l);c&&(n.push(c),n.sort(bp))}if(n.length===1)return n[0];if(i){for(let o=0;oe.serialize()).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=Ur.create(e,this,!0)}return this.negated}}class Ur{static create(e,t,i){return Ur._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const s of X1(t))for(const o of X1(i))n.push(jl.create([s,o],null,!1));e.unshift(Ur.create(n,null,!1))}this.negated=Ur.create(e,this,!0)}return this.negated}}class le extends _c{static all(){return le._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,typeof i=="object"?le._info.push(Object.assign(Object.assign({},i),{key:e})):i!==!0&&le._info.push({key:e,description:i,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return ug.create(this.key,e)}}le._info=[];const Ne=tt("contextKeyService");function qP(r,e){return re?1:0}function xh(r,e,t,i){return rt?1:ei?1:0}function iD(r,e){if(r.type===0||e.type===1)return!0;if(r.type===9)return e.type===9?Y1(r.expr,e.expr):!1;if(e.type===9){for(const t of e.expr)if(iD(r,t))return!0;return!1}if(r.type===6){if(e.type===6)return Y1(e.expr,r.expr);for(const t of r.expr)if(iD(t,e))return!0;return!1}return r.equals(e)}function Y1(r,e){let t=0,i=0;for(;t=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},W0=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const x$={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0,findResultLoop:!0};let nD=class extends V{constructor(e,t={},i,n,s){super(),this._audioCueService=i,this._codeEditorService=n,this._accessibilityService=s,this._onDidUpdate=this._register(new A),this._editor=e,this._options=Mw(t,x$,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!this._options.alwaysRevealFirst,this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(o=>{this.ignoreSelectionChange||(this._updateAccessibilityState(o.position.lineNumber),this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(o=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(t=>{!this._options.ignoreCharChanges&&t.charChanges?t.charChanges.forEach(i=>{this.ranges.push({rhs:!0,range:new S(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn)})}):t.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new S(t.modifiedStartLineNumber,1,t.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new S(t.modifiedStartLineNumber,1,t.modifiedEndLineNumber+1,1)})}),this.ranges.sort((t,i)=>S.compareRangesUsingStarts(t.range,i.range)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,s=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealRangeInCenter(i.range,t),this._updateAccessibilityState(n.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(e,t){var i;const n=(i=this._editor.getModel())===null||i===void 0?void 0:i.modified;if(!n)return;const s=n.getLineDecorations(e).find(a=>a.options.className==="line-insert");if(s)this._audioCueService.playAudioCue(_t.diffLineModified,!0);else if(t)this._audioCueService.playAudioCue(_t.diffLineDeleted,!0);else return;const o=this._codeEditorService.getActiveCodeEditor();t&&o&&s&&this._accessibilityService.isScreenReaderOptimized()&&(o.setSelection({startLineNumber:e,startColumn:0,endLineNumber:e,endColumn:Number.MAX_VALUE}),o.writeScreenReaderContent("diff-navigation"))}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this.canNavigateNext()&&this._move(!0,e)}previous(e=0){this.canNavigatePrevious()&&this._move(!1,e)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx0&&r.getLanguageId(o-1)===n;)o--;return new E$(r,n,o,s+1,r.getStartOffset(o),r.getEndOffset(s))}class E${constructor(e,t,i,n,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function Nr(r){return(r&3)!==0}class gg{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new V0(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new V0({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new V0({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:gg.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:gg.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}gg.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> `;gg.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> `;const Q1=typeof Buffer<"u";let H0;class jw{static wrap(e){return Q1&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new jw(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Q1?this.buffer.toString():(H0||(H0=new TextDecoder),H0.decode(this.buffer))}}function T$(r,e){return r[e+0]<<0>>>0|r[e+1]<<8>>>0}function N$(r,e,t){r[t+0]=e&255,e=e>>>8,r[t+1]=e&255}function Yo(r,e){return r[e]*Math.pow(2,24)+r[e+1]*Math.pow(2,16)+r[e+2]*Math.pow(2,8)+r[e+3]}function Xo(r,e,t){r[t+3]=e,e=e>>>8,r[t+2]=e,e=e>>>8,r[t+1]=e,e=e>>>8,r[t]=e}function J1(r,e){return r[e]}function eN(r,e,t){r[t]=e}let z0;function GP(){return z0||(z0=new TextDecoder("UTF-16LE")),z0}let U0;function M$(){return U0||(U0=new TextDecoder("UTF-16BE")),U0}let $0;function ZP(){return $0||($0=lP()?GP():M$()),$0}function R$(r,e,t){const i=new Uint16Array(r.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?A$(r,e,t):GP().decode(i)}function A$(r,e,t){const i=[];let n=0;for(let s=0;s=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i[o[0].toLowerCase(),o[1].toLowerCase()]);const t=[];for(let o=0;o{const[l,c]=o,[d,h]=a;return l===d||l===h||c===d||c===h},n=(o,a)=>{const l=Math.min(o,a),c=Math.max(o,a);for(let d=0;d0&&s.push({open:a,close:l})}return s}class P${constructor(e,t){this._richEditBracketsBrand=void 0;const i=O$(t);this.brackets=i.map((n,s)=>new Xb(e,s,n.open,n.close,F$(n.open,n.close,i,s),B$(n.open,n.close,i,s))),this.forwardRegex=W$(this.brackets),this.reversedRegex=V$(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function YP(r,e,t,i){for(let n=0,s=e.length;n=0&&i.push(a);for(const a of o.close)a.indexOf(r)>=0&&i.push(a)}}function XP(r,e){return r.length-e.length}function Kw(r){if(r.length<=1)return r;const e=[],t=new Set;for(const i of r)t.has(i)||(e.push(i),t.add(i));return e}function F$(r,e,t,i){let n=[];n=n.concat(r),n=n.concat(e);for(let s=0,o=n.length;s=0;o--)n[s++]=i.charCodeAt(o);return ZP().decode(n)}let e=null,t=null;return function(n){return e!==n&&(e=n,t=r(e)),t}}();class vo{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const o=i.length-(s.index||0),a=s[0].length,l=n+o;return new S(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const a=JI(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,a,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const o=s.index||0,a=s[0].length;if(a===0)return null;const l=n+o;return new S(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}class z${constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const n=i.charAt(i.length-1);e.push(n)}return gc(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const n=t.findTokenIndexAtOffset(i-1);if(Nr(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,a=vo.findPrevBracketInRange(s,1,o,0,o.length);if(!a)return null;const l=o.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const d=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:l}:null}}function sv(r){return r.global&&(r.lastIndex=0),!0}class U${constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&sv(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&sv(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&sv(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&sv(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class wu{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const i=wu._createOpenBracketRegExp(t[0]),n=wu._createCloseBracketRegExp(t[1]);i&&n&&this._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,o=this._regExpRules.length;sc.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,o=this._brackets.length;s=2&&i.length>0){for(let s=0,o=this._brackets.length;s"u"?t:s}function j$(r){return r.replace(/[\[\]]/g,"")}const Ut=tt("languageService");class Br{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}const eF=[];function rt(r,e,t){e instanceof Br||(e=new Br(e,[],!!t)),eF.push([r,e])}function iN(){return eF}class K${constructor(){this.data=new Map}add(e,t){pp(gs(e)),pp(_r(t)),pp(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const Kt=new K$,Qn=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),Gw={JSONContribution:"base.contributions.json"};function q$(r){return r.length>0&&r.charAt(r.length-1)==="#"?r.substring(0,r.length-1):r}class G${constructor(){this._onDidChangeSchema=new A,this.schemasById={}}registerSchema(e,t){this.schemasById[q$(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const Z$=new G$;Kt.add(Gw.JSONContribution,Z$);const va={Configuration:"base.contributions.configuration"},bf="vscode://schemas/settings/resourceLanguage",nN=Kt.as(Gw.JSONContribution);class Y${constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new A,this._onDidUpdateConfiguration=new A,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:f("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},nN.registerSchema(bf,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),nN.registerSchema(bf,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:s,source:o}of e)for(const a in s)if(t.add(a),vc.test(a)){const l=this.configurationDefaultsOverrides.get(a),c=(i=l==null?void 0:l.valuesSources)!==null&&i!==void 0?i:new Map;if(o)for(const g of Object.keys(s[a]))c.set(g,o);const d=Object.assign(Object.assign({},(l==null?void 0:l.value)||{}),s[a]);this.configurationDefaultsOverrides.set(a,{source:o,value:d,valuesSources:c});const h=j$(a),u={type:"object",default:d,description:f("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",h),$ref:bf,defaultDefaultValue:d,source:gs(o)?void 0:o,defaultValueSource:o};n.push(...Qb(a)),this.configurationProperties[a]=u,this.defaultLanguageConfigurationOverridesNode.properties[a]=u}else{this.configurationDefaultsOverrides.set(a,{value:s[a],source:o});const l=this.configurationProperties[a];l&&(this.updatePropertyDefaultValue(a,l),this.updateSchema(a,l))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach(n=>{this.validateAndRegisterProperties(n,t,n.extensionInfo,n.restrictedProperties,void 0,i),this.configurationContributors.push(n),this.registerJSONConfiguration(n)})}validateAndRegisterProperties(e,t=!0,i,n,s=3,o){var a;s=Hr(e.scope)?s:e.scope;const l=e.properties;if(l)for(const d in l){const h=l[d];if(t&&J$(d,h)){delete l[d];continue}if(h.source=i,h.defaultDefaultValue=l[d].default,this.updatePropertyDefaultValue(d,h),vc.test(d)?h.scope=void 0:(h.scope=Hr(h.scope)?s:h.scope,h.restricted=Hr(h.restricted)?!!(n!=null&&n.includes(d)):h.restricted),l[d].hasOwnProperty("included")&&!l[d].included){this.excludedConfigurationProperties[d]=l[d],delete l[d];continue}else this.configurationProperties[d]=l[d],!((a=l[d].policy)===null||a===void 0)&&a.name&&this.policyConfigurations.set(l[d].policy.name,d);!l[d].deprecationMessage&&l[d].markdownDeprecationMessage&&(l[d].deprecationMessage=l[d].markdownDeprecationMessage),o.add(d)}const c=e.allOf;if(c)for(const d of c)this.validateAndRegisterProperties(d,t,i,n,s,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=i=>{const n=i.properties;if(n)for(const o in n)this.updateSchema(o,n[o]);const s=i.allOf;s==null||s.forEach(t)};t(e)}updateSchema(e,t){switch(t.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:f("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:f("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:bf};this.updatePropertyDefaultValue(t,i)}}registerOverridePropertyPatternKey(){f("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),f("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=i==null?void 0:i.value,s=i==null?void 0:i.source;Es(n)&&(n=t.defaultDefaultValue,s=void 0),Es(n)&&(n=Q$(t.type)),t.default=n,t.defaultValueSource=s}}const tF="\\[([^\\]]+)\\]",sN=new RegExp(tF,"g"),X$=`^(${tF})+$`,vc=new RegExp(X$);function Qb(r){const e=[];if(vc.test(r)){let t=sN.exec(r);for(;t!=null&&t.length;){const i=t[1].trim();i&&e.push(i),t=sN.exec(r)}}return gc(e)}function Q$(r){switch(Array.isArray(r)?r[0]:r){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const pb=new Y$;Kt.add(va.Configuration,pb);function J$(r,e){var t,i,n,s;return r.trim()?vc.test(r)?f("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",r):pb.getConfigurationProperties()[r]!==void 0?f("config.property.duplicate","Cannot register '{0}'. This property is already registered.",r):!((t=e.policy)===null||t===void 0)&&t.name&&pb.getPolicyConfigurations().get((i=e.policy)===null||i===void 0?void 0:i.name)!==void 0?f("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",r,(n=e.policy)===null||n===void 0?void 0:n.name,pb.getPolicyConfigurations().get((s=e.policy)===null||s===void 0?void 0:s.name)):null:f("config.property.empty","Cannot register an empty property")}const e5={ModesRegistry:"editor.modesRegistry"};class t5{constructor(){this._onDidChangeLanguages=new A,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{const l=new Set;return{info:new s5(this,a,l),closing:l}}),s=new T1(a=>{const l=new Set,c=new Set;return{info:new o5(this,a,l,c),opening:l,openingColorized:c}});for(const[a,l]of i){const c=n.get(a),d=s.get(l);c.closing.add(d.info),d.opening.add(c.info)}const o=t.colorizedBracketPairs?oN(t.colorizedBracketPairs):i.filter(a=>!(a[0]==="<"&&a[1]===">"));for(const[a,l]of o){const c=n.get(a),d=s.get(l);c.closing.add(d.info),d.openingColorized.add(c.info),d.opening.add(c.info)}this._openingBrackets=new Map([...n.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...s.cachedValues].map(([a,l])=>[a,l.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function oN(r){return r.filter(([e,t])=>e!==""&&t!=="")}class iF{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class s5 extends iF{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class o5 extends iF{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var r5=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rN=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class j0{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const li=tt("languageConfigurationService");let oD=class extends V{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new d5),this.onDidChangeEmitter=this._register(new A),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(rD));this._register(this.configurationService.onDidChangeConfiguration(n=>{const s=n.change.keys.some(a=>i.has(a)),o=n.change.overrides.filter(([a,l])=>l.some(c=>i.has(c))).map(([a])=>a);if(s)this.configurations.clear(),this.onDidChangeEmitter.fire(new j0(void 0));else for(const a of o)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new j0(a)))})),this._register(this._registry.onDidChange(n=>{this.configurations.delete(n.languageId),this.onDidChangeEmitter.fire(new j0(n.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=a5(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};oD=r5([rN(0,at),rN(1,Ut)],oD);function a5(r,e,t,i){let n=e.getLanguageConfiguration(r);if(!n){if(!i.isRegisteredLanguageId(r))return new $u(r,{});n=new $u(r,{})}const s=l5(n.languageId,t),o=sF([n.underlyingConfig,s]);return new $u(n.languageId,o)}const rD={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function l5(r,e){const t=e.getValue(rD.brackets,{overrideIdentifier:r}),i=e.getValue(rD.colorizedBracketPairs,{overrideIdentifier:r});return{brackets:aN(t),colorizedBracketPairs:aN(i)}}function aN(r){if(Array.isArray(r))return r.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function nF(r,e,t){const i=r.getLineContent(e);let n=Lt(i);return n.length>t-1&&(n=n.substring(0,t-1)),n}function Uu(r,e,t){r.tokenization.forceTokenization(e);const i=r.tokenization.getLineTokens(e),n=typeof t>"u"?r.getLineMaxColumn(e)-1:t-1;return $w(i,n)}class c5{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new lN(e,t,++this._order);return this._entries.push(i),this._resolved=null,Ke(()=>{for(let n=0;ne.configuration)))}}function sF(r){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const t of r)e={comments:t.comments||e.comments,brackets:t.brackets||e.brackets,wordPattern:t.wordPattern||e.wordPattern,indentationRules:t.indentationRules||e.indentationRules,onEnterRules:t.onEnterRules||e.onEnterRules,autoClosingPairs:t.autoClosingPairs||e.autoClosingPairs,surroundingPairs:t.surroundingPairs||e.surroundingPairs,autoCloseBefore:t.autoCloseBefore||e.autoCloseBefore,folding:t.folding||e.folding,colorizedBracketPairs:t.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:t.__electricCharacterSupport||e.__electricCharacterSupport};return e}class lN{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class cN{constructor(e){this.languageId=e}}class d5 extends V{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new A),this.onDidChange=this._onDidChange.event,this._register(this.register(Os,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new c5(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new cN(e)),Ke(()=>{s.dispose(),this._onDidChange.fire(new cN(e))})}getLanguageConfiguration(e){const t=this._entries.get(e);return(t==null?void 0:t.getResolvedConfiguration())||null}}class $u{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new wu(this.underlyingConfig):null,this.comments=$u._handleComments(this.underlyingConfig),this.characterPair=new gg(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||Cz,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new U$(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new n5(e,this.underlyingConfig)}getWordDefinition(){return wz(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new P$(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new z$(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new I$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[n,s]=t.blockComment;i.blockCommentStartToken=n,i.blockCommentEndToken=s}return i}}rt(li,oD,1);const pg=new class{clone(){return this}equals(r){return this===r}};function eE(r,e){return new TI([new qb(0,"",r)],e)}function Zw(r,e){const t=new Uint32Array(2);return t[0]=0,t[1]=(r<<0|0|0|32768|2<<24)>>>0,new Rw(t,e===null?pg:e)}const qt=tt("modelService"),oF=Symbol("MicrotaskDelay");var Ks=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Uf=globalThis&&globalThis.__asyncValues||function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=r[s]&&function(o){return new Promise(function(a,l){o=r[s](o),n(a,l,o.done,o.value)})}}function n(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}};function aD(r){return!!r&&typeof r.then=="function"}function Hi(r){const e=new cn,t=r(e.token),i=new Promise((n,s)=>{const o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),s(new kh)});Promise.resolve(t).then(a=>{o.dispose(),e.dispose(),n(a)},a=>{o.dispose(),e.dispose(),s(a)})});return new class{cancel(){e.cancel()}then(n,s){return i.then(n,s)}catch(n){return this.then(void 0,n)}finally(n){return i.finally(n)}}}function Yw(r,e,t){return new Promise((i,n)=>{const s=e.onCancellationRequested(()=>{s.dispose(),i(t)});r.then(i,n).finally(()=>s.dispose())})}class h5{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{this.queuedPromise=null;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(t,t).then(i)})}return new Promise((t,i)=>{this.queuedPromise.then(t,i)})}return this.activePromise=e(),new Promise((t,i)=>{this.activePromise.then(n=>{this.activePromise=null,t(n)},n=>{this.activePromise=null,i(n)})})}}const u5=(r,e)=>{let t=!0;const i=setTimeout(()=>{t=!1,e()},r);return{isTriggered:()=>t,dispose:()=>{clearTimeout(i),t=!1}}},g5=r=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,r())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class ca{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((n,s)=>{this.doResolve=n,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const n=this.task;return this.task=null,n()}}));const i=()=>{var n;this.deferred=null,(n=this.doResolve)===null||n===void 0||n.call(this,null)};return this.deferred=t===oF?g5(i):u5(t,i),this.completionPromise}isTriggered(){var e;return!!(!((e=this.deferred)===null||e===void 0)&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)===null||e===void 0||e.call(this,new kh),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class rF{constructor(e){this.delayer=new ca(e),this.throttler=new h5}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}function bc(r,e){return e?new Promise((t,i)=>{const n=setTimeout(()=>{s.dispose(),t()},r),s=e.onCancellationRequested(()=>{clearTimeout(n),s.dispose(),i(new kh)})}):Hi(t=>bc(r,t))}function Kd(r,e=0){const t=setTimeout(r,e);return Ke(()=>clearTimeout(t))}function aF(r,e=i=>!!i,t=null){let i=0;const n=r.length,s=()=>{if(i>=n)return Promise.resolve(t);const o=r[i++];return Promise.resolve(o()).then(l=>e(l)?Promise.resolve(l):s())};return s()}class lo{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class f_{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class yt{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)===null||e===void 0||e.call(this)}}let Ya;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?Ya=r=>{cP(()=>{if(e)return;const t=Date.now()+15;r(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,t-Date.now())}}))});let e=!1;return{dispose(){e||(e=!0)}}}:Ya=(r,e)=>{const t=requestIdleCallback(r,typeof e=="number"?{timeout:e}:void 0);let i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(t))}}}})();class mb{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=Ya(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class tE{get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.resolved=!0,t()})}cancel(){new Promise(e=>{this.errorCallback(new kh),this.rejected=!0,e()})}}var lD;(function(r){function e(i){return Ks(this,void 0,void 0,function*(){let n;const s=yield Promise.all(i.map(o=>o.then(a=>a,a=>{n||(n=a)})));if(typeof n<"u")throw n;return s})}r.settled=e;function t(i){return new Promise((n,s)=>Ks(this,void 0,void 0,function*(){try{yield i(n,s)}catch(o){s(o)}}))}r.withAsyncBody=t})(lD||(lD={}));class vi{static fromArray(e){return new vi(t=>{t.emitMany(e)})}static fromPromise(e){return new vi(t=>Ks(this,void 0,void 0,function*(){t.emitMany(yield e)}))}static fromPromises(e){return new vi(t=>Ks(this,void 0,void 0,function*(){yield Promise.all(e.map(i=>Ks(this,void 0,void 0,function*(){return t.emitOne(yield i)})))}))}static merge(e){return new vi(t=>Ks(this,void 0,void 0,function*(){yield Promise.all(e.map(i=>{var n,s,o;return Ks(this,void 0,void 0,function*(){var a,l,c,d;try{for(n=!0,s=Uf(i);o=yield s.next(),a=o.done,!a;){d=o.value,n=!1;try{const h=d;t.emitOne(h)}finally{n=!0}}}catch(h){l={error:h}}finally{try{!n&&!a&&(c=s.return)&&(yield c.call(s))}finally{if(l)throw l.error}}})}))}))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new A,queueMicrotask(()=>Ks(this,void 0,void 0,function*(){const t={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{yield Promise.resolve(e(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:()=>Ks(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(eKs(this,void 0,void 0,function*(){var n,s,o,a;try{for(var l=!0,c=Uf(e),d;d=yield c.next(),n=d.done,!n;){a=d.value,l=!1;try{const h=a;i.emitOne(t(h))}finally{l=!0}}}catch(h){s={error:h}}finally{try{!l&&!n&&(o=c.return)&&(yield o.call(c))}finally{if(s)throw s.error}}}))}map(e){return vi.map(this,e)}static filter(e,t){return new vi(i=>Ks(this,void 0,void 0,function*(){var n,s,o,a;try{for(var l=!0,c=Uf(e),d;d=yield c.next(),n=d.done,!n;){a=d.value,l=!1;try{const h=a;t(h)&&i.emitOne(h)}finally{l=!0}}}catch(h){s={error:h}}finally{try{!l&&!n&&(o=c.return)&&(yield o.call(c))}finally{if(s)throw s.error}}}))}filter(e){return vi.filter(this,e)}static coalesce(e){return vi.filter(e,t=>!!t)}coalesce(){return vi.coalesce(this)}static toPromise(e){var t,i,n,s,o,a,l;return Ks(this,void 0,void 0,function*(){const c=[];try{for(t=!0,i=Uf(e);n=yield i.next(),s=n.done,!s;){l=n.value,t=!1;try{const d=l;c.push(d)}finally{t=!0}}}catch(d){o={error:d}}finally{try{!t&&!s&&(a=i.return)&&(yield a.call(i))}finally{if(o)throw o.error}}return c})}toPromise(){return vi.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}}vi.EMPTY=vi.fromArray([]);class f5 extends vi{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function p5(r){const e=new cn,t=r(e.token);return new f5(e,i=>Ks(this,void 0,void 0,function*(){var n,s,o,a;const l=e.token.onCancellationRequested(()=>{l.dispose(),e.dispose(),i.reject(new kh)});try{try{for(var c=!0,d=Uf(t),h;h=yield d.next(),n=h.done,!n;){a=h.value,c=!1;try{const u=a;if(e.token.isCancellationRequested)return;i.emitOne(u)}finally{c=!0}}}catch(u){s={error:u}}finally{try{!c&&!n&&(o=d.return)&&(yield o.call(d))}finally{if(s)throw s.error}}l.dispose(),e.dispose()}catch(u){l.dispose(),e.dispose(),i.reject(u)}}))}var K0;const dN=(K0=window.trustedTypes)===null||K0===void 0?void 0:K0.createPolicy("defaultWorkerFactory",{createScriptURL:r=>r});function m5(r){if(cd.MonacoEnvironment){if(typeof cd.MonacoEnvironment.getWorker=="function")return cd.MonacoEnvironment.getWorker("workerMain.js",r);if(typeof cd.MonacoEnvironment.getWorkerUrl=="function"){const e=cd.MonacoEnvironment.getWorkerUrl("workerMain.js",r);return new Worker(dN?dN.createScriptURL(e):e,{name:r})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function _5(r){return typeof r.then=="function"}class v5{constructor(e,t,i,n,s){this.id=t;const o=m5(i);_5(o)?this.worker=o:this.worker=Promise.resolve(o),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){n(l.data)},a.onmessageerror=s,typeof a.addEventListener=="function"&&a.addEventListener("error",s)})}getId(){return this.id}postMessage(e,t){var i;(i=this.worker)===null||i===void 0||i.then(n=>n.postMessage(e,t))}dispose(){var e;(e=this.worker)===null||e===void 0||e.then(t=>t.terminate()),this.worker=null}}class Xw{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++Xw.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new v5(e,n,this._label||"anonymous"+n,t,s=>{qL(s),this._webWorkerFailedBeforeError=s,i(s)})}}Xw.LAST_WORKER_ID=0;const iE=tt("textResourceConfigurationService"),lF=tt("textResourcePropertiesService"),co=tt("logService");var Do;(function(r){r[r.Off=0]="Off",r[r.Trace=1]="Trace",r[r.Debug=2]="Debug",r[r.Info=3]="Info",r[r.Warning=4]="Warning",r[r.Error=5]="Error"})(Do||(Do={}));const cF=Do.Info;class dF extends V{constructor(){super(...arguments),this.level=cF,this._onDidChangeLogLevel=this._register(new A),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==Do.Off&&this.level<=e}}class b5 extends dF{constructor(e=cF){super(),this.setLevel(e)}trace(e,...t){this.checkLogLevel(Do.Trace)&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.checkLogLevel(Do.Debug)&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.checkLogLevel(Do.Info)&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.checkLogLevel(Do.Error)&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class C5 extends dF{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}const ge=tt("ILanguageFeaturesService");var w5=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cf=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Jb=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const hN=60*1e3,uN=5*60*1e3;function dd(r,e){const t=r.getModel(e);return!(!t||t.isTooLargeForSyncing())}let cD=class extends V{constructor(e,t,i,n,s){super(),this._modelService=e,this._workerManager=this._register(new y5(this._modelService,n)),this._logService=i,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(o,a)=>dd(this._modelService,o.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(o.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(s.completionProvider.register("*",new S5(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return dd(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then(n=>n.computedUnicodeHighlights(e,t,i))}computeDiff(e,t,i,n){return Jb(this,void 0,void 0,function*(){const s=yield this._workerManager.withWorker().then(a=>a.computeDiff(e,t,i,n));return s?{identical:s.identical,quitEarly:s.quitEarly,changes:s.changes.map(a=>{var l;return new dP(new GL(a[0],a[1]),new GL(a[2],a[3]),(l=a[4])===null||l===void 0?void 0:l.map(c=>new hP(new S(c[0],c[1],c[2],c[3]),new S(c[4],c[5],c[6],c[7]))))})}:null})}computeMoreMinimalEdits(e,t){if(Cn(t)){if(!dd(this._modelService,e))return Promise.resolve(t);const i=Ao.create(!0),n=this._workerManager.withWorker().then(s=>s.computeMoreMinimalEdits(e,t));return n.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),Promise.race([n,bc(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return dd(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return dd(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};cD=w5([Cf(0,qt),Cf(1,iE),Cf(2,co),Cf(3,li),Cf(4,ge)],cD);class S5{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return Jb(this,void 0,void 0,function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if(i.wordBasedSuggestionsMode==="currentDocument")dd(this._modelService,e.uri)&&n.push(e.uri);else for(const h of this._modelService.getModels())dd(this._modelService,h.uri)&&(h===e?n.unshift(h.uri):(i.wordBasedSuggestionsMode==="allDocuments"||h.getLanguageId()===e.getLanguageId())&&n.push(h.uri));if(n.length===0)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),o=e.getWordAtPosition(t),a=o?new S(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):S.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),d=yield(yield this._workerManager.withWorker()).textualSuggest(n,o==null?void 0:o.word,s);if(d)return{duration:d.duration,suggestions:d.words.map(h=>({kind:18,label:h,insertText:h,range:{insert:l,replace:a}}))}})}}class y5 extends V{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new f_).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(uN/2)),this._register(this._modelService.onModelRemoved(n=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>uN&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new hF(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class L5 extends V{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const n=new f_;n.cancelAndSet(()=>this._checkStopModelSync(),Math.round(hN/2)),this._register(n)}}dispose(){for(const e in this._syncedModels)wt(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const n=i.toString();this._syncedModels[n]||this._beginModelSync(i,t),this._syncedModels[n]&&(this._syncedModelsLastUsedTime[n]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>hN&&t.push(i);for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i||!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new Y;s.add(i.onDidChangeContent(o=>{this._proxy.acceptModelChanged(n.toString(),o)})),s.add(i.onWillDispose(()=>{this._stopModelSync(n)})),s.add(Ke(()=>{this._proxy.acceptRemovedModel(n)})),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],wt(t)}}class gN{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class q0{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class hF extends V{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Xw(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Sz(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new q0(this)))}catch(e){qL(e),this._worker=new gN(new N1(new q0(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(qL(e),this._worker=new gN(new N1(new q0(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new L5(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return Jb(this,void 0,void 0,function*(){return this._disposed?Promise.reject(yz()):this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i))})}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then(n=>n.computeUnicodeHighlights(e.toString(),t,i))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then(s=>s.computeDiff(e.toString(),t.toString(),i,n))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t,i){return Jb(this,void 0,void 0,function*(){const n=yield this._withSyncedResources(e),s=i.source,o=A0(i);return n.textualSuggest(e.map(a=>a.toString()),t,s,o)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),o=s.source,a=A0(s);return i.computeWordRanges(e.toString(),t,o,a)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{const s=this._modelService.getModel(e);if(!s)return null;const o=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),a=o.source,l=A0(o);return n.navigateValueSet(e.toString(),t,i,a,l)})}dispose(){super.dispose(),this._disposed=!0}}function D5(r,e,t){return new k5(r,e,t)}class k5 extends hF{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?Lz(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(i=>{this._foreignModuleCreateData=null;const n=(a,l)=>e.fmr(a,l),s=(a,l)=>function(){const c=Array.prototype.slice.call(arguments,0);return l(a,c)},o={};for(const a of i)o[a]=s(a,n);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}class on{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let i="mtk"+this.getForeground(e);const n=this.getFontStyle(e);return n&1&&(i+=" mtki"),n&2&&(i+=" mtkb"),n&4&&(i+=" mtku"),n&8&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;n&1&&(s+="font-style: italic;"),n&2&&(s+="font-weight: bold;");let o="";return n&4&&(o+=" underline"),n&8&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:!!(i&1),bold:!!(i&2),underline:!!(i&4),strikethrough:!!(i&8)}}}class Ei{static createEmpty(e,t){const i=Ei.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new Ei(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof Ei?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let o=n;o0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],i=on.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return on.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return on.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return on.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[(e<<1)+1];return on.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return on.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Ei.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new nE(this,e,t,i)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let s=0;s>>1)-1;for(;it&&(n=s)}return i}withInserted(e){if(e.length===0)return this;let t=0,i=0,n="";const s=new Array;let o=0;for(;;){const a=to){n+=this._text.substring(o,l.offset);const c=this._tokens[(t<<1)+1];s.push(n.length,c),o=l.offset}n+=l.text,s.push(n.length,l.tokenMetadata),i++}else break}return new Ei(new Uint32Array(s),n,this._languageIdCodec)}}Ei.defaultTokenMetadata=(32768|2<<24)>>>0;class nE{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,o=e.getCount();s=i);s++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof nE?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class us{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s=s||(a[l++]=new us(Math.max(1,c.startColumn-n+1),Math.min(o+1,c.endColumn-n+1),c.className,c.type));return a}static filter(e,t,i,n){if(e.length===0)return[];const s=[];let o=0;for(let a=0,l=e.length;at||d.isEmpty()&&(c.type===0||c.type===3))continue;const h=d.startLineNumber===t?d.startColumn:i,u=d.endLineNumber===t?d.endColumn:n;s[o++]=new us(h,u,c.inlineClassName,c.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=us._typeCompare(e.type,t.type);return i!==0?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class x5{static normalize(e,t){if(t.length===0)return[];const i=[],n=new eC;let s=0;for(let o=0,a=t.length;o1){const m=e.charCodeAt(c-2);In(m)&&c--}if(d>1){const m=e.charCodeAt(d-2);In(m)&&d--}const g=c-1,p=d-2;s=n.consumeLowerThan(g,s,i),n.count===0&&(s=g),n.insert(p,h,u)}return n.consumeLowerThan(1073741824,s,i),i}}class Bi{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class uF{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Fc{constructor(e,t,i,n,s,o,a,l,c,d,h,u,g,p,m,_,b,v,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(us.compare),this.tabSize=d,this.startVisibleColumn=h,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace=_==="all"?4:_==="boundary"?1:_==="selection"?2:_==="trailing"?3:0,this.renderControlCharacters=b,this.fontLigatures=v,this.selectionsOnLine=C&&C.sort((T,y)=>T.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const s=(t<<16|i<<0)>>>0;this._data[e-1]=s,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=Wr.getPartIndex(t),n=Wr.getCharIndex(t);return new sE(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(this.length===0)return 0;const n=(e<<16|i<<0)>>>0;let s=0,o=this.length-1;for(;s+1>>1,_=this._data[m];if(_===n)return m;_>n?o=m:s=m}if(s===o)return s;const a=this._data[s],l=this._data[o];if(a===n)return s;if(l===n)return o;const c=Wr.getPartIndex(a),d=Wr.getCharIndex(a),h=Wr.getPartIndex(l);let u;c!==h?u=t:u=Wr.getCharIndex(l);const g=i-d,p=u-i;return g<=p?s:o}}class dD{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function p_(r,e){if(r.lineContent.length===0){if(r.lineDecorations.length>0){e.appendString("");let t=0,i=0,n=0;for(const o of r.lineDecorations)(o.type===1||o.type===2)&&(e.appendString(''),o.type===1&&(n|=1,t++),o.type===2&&(n|=2,i++));e.appendString("");const s=new Wr(1,t+i);return s.setColumnInfo(1,t,0,0),new dD(s,!1,n)}return e.appendString(""),new dD(new Wr(0,0),!1,0)}return P5(T5(r),e)}class I5{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function Qw(r){const e=new Xg(1e4),t=p_(r,e);return new I5(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class E5{constructor(e,t,i,n,s,o,a,l,c,d,h,u,g,p,m,_){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=o,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=c,this.tabSize=d,this.startVisibleColumn=h,this.containsRTL=u,this.spaceWidth=g,this.renderSpaceCharCode=p,this.renderWhitespace=m,this.renderControlCharacters=_}}function T5(r){const e=r.lineContent;let t,i,n;r.stopRenderingLineAfter!==-1&&r.stopRenderingLineAfter0){for(let a=0,l=r.lineDecorations.length;a0&&(s[o++]=new Bi(i,"",0,!1));let a=i;for(let l=0,c=t.getCount();l=n){const g=e?cg(r.substring(a,n)):!1;s[o++]=new Bi(n,h,0,g);break}const u=e?cg(r.substring(a,d)):!1;s[o++]=new Bi(d,h,0,u),a=d}return s}function M5(r,e,t){let i=0;const n=[];let s=0;if(t)for(let o=0,a=e.length;o=50&&(n[s++]=new Bi(g+1,d,h,u),p=g+1,g=-1);p!==c&&(n[s++]=new Bi(c,d,h,u))}else n[s++]=l;i=c}else for(let o=0,a=e.length;o50){const h=l.type,u=l.metadata,g=l.containsRTL,p=Math.ceil(d/50);for(let m=1;m=8234&&r<=8238||r>=8294&&r<=8297||r>=8206&&r<=8207||r===1564}function R5(r,e){const t=[];let i=new Bi(0,"",0,!1),n=0;for(const s of e){const o=s.endIndex;for(;ni.endIndex&&(i=new Bi(n,s.type,s.metadata,s.containsRTL),t.push(i)),i=new Bi(n+1,"mtkcontrol",s.metadata,!1),t.push(i))}n>i.endIndex&&(i=new Bi(o,s.type,s.metadata,s.containsRTL),t.push(i))}return t}function A5(r,e,t,i){const n=r.continuesWithWrappedLine,s=r.fauxIndentLength,o=r.tabSize,a=r.startVisibleColumn,l=r.useMonospaceOptimizations,c=r.selectionsOnLine,d=r.renderWhitespace===1,h=r.renderWhitespace===3,u=r.renderSpaceWidth!==r.spaceWidth,g=[];let p=0,m=0,_=i[m].type,b=i[m].containsRTL,v=i[m].endIndex;const C=i.length;let w=!1,L=Fn(e),T;L===-1?(w=!0,L=t,T=t):T=oa(e);let y=!1,D=0,N=c&&c[D],R=a%o;for(let U=s;U=N.endOffset&&(D++,N=c&&c[D]);let ie;if(UT)ie=!0;else if(H===9)ie=!0;else if(H===32)if(d)if(y)ie=!0;else{const he=U+1U),ie&&h&&(ie=w||U>T),ie&&b&&U>=L&&U<=T&&(ie=!1),y){if(!ie||!l&&R>=o){if(u){const he=p>0?g[p-1].endIndex:s;for(let _e=he+1;_e<=U;_e++)g[p++]=new Bi(_e,"mtkw",1,!1)}else g[p++]=new Bi(U,"mtkw",1,!1);R=R%o}}else(U===v||ie&&U>s)&&(g[p++]=new Bi(U,_,0,b),R=R%o);for(H===9?R=o:fc(H)?R+=2:R++,y=ie;U===v&&(m++,m0?e.charCodeAt(t-1):0,H=t>1?e.charCodeAt(t-2):0;U===32&&H!==32&&H!==9||(B=!0)}else B=!0;if(B)if(u){const U=p>0?g[p-1].endIndex:s;for(let H=U+1;H<=t;H++)g[p++]=new Bi(H,"mtkw",1,!1)}else g[p++]=new Bi(t,"mtkw",1,!1);else g[p++]=new Bi(t,_,0,b);return g}function O5(r,e,t,i){i.sort(us.compare);const n=x5.normalize(r,i),s=n.length;let o=0;const a=[];let l=0,c=0;for(let h=0,u=t.length;hc&&(c=v.startOffset,a[l++]=new Bi(c,m,_,b)),v.endOffset+1<=p)c=v.endOffset+1,a[l++]=new Bi(c,m+" "+v.className,_|v.metadata,b),o++;else{c=p,a[l++]=new Bi(c,m+" "+v.className,_|v.metadata,b);break}}p>c&&(c=p,a[l++]=new Bi(c,m,_,b))}const d=t[t.length-1].endIndex;if(o'):e.appendString("");for(let N=0,R=c.length;N=d&&(qe+=fe)}}for(_e&&(e.appendString(' style="width:'),e.appendString(String(p*We)),e.appendString('px"')),e.appendASCIICharCode(62);w1?e.appendCharCode(8594):e.appendCharCode(65515);for(let fe=2;fe<=Ye;fe++)e.appendCharCode(160)}else qe=2,Ye=1,e.appendCharCode(m),e.appendCharCode(8204);T+=qe,y+=Ye,w>=d&&(L+=Ye)}}else for(e.appendASCIICharCode(62);w=d&&(L+=qe)}Me?D++:D=0,w>=o&&!C&&B.isPseudoAfter()&&(C=!0,v.setColumnInfo(w+1,N,T,y)),e.appendString("")}return C||v.setColumnInfo(o+1,c.length-1,T,y),a&&(e.appendString(''),e.appendString(f("showMore","Show more ({0})",B5(l))),e.appendString("")),e.appendString(""),new dD(v,g,n)}function F5(r){return r.toString(16).toUpperCase().padStart(4,"0")}function B5(r){return r<1024?f("overflow.chars","{0} chars",r):r<1024*1024?`${(r/1024).toFixed(1)} KB`:`${(r/1024/1024).toFixed(1)} MB`}class pN{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=i|0,this.height=n|0}}class W5{constructor(e,t){this.tabSize=e,this.data=t}}class oE{constructor(e,t,i,n,s,o,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=a}}class Fs{constructor(e,t,i,n,s,o,a,l,c,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=Fs.isBasicASCII(i,o),this.containsRTL=Fs.containsRTL(i,this.isBasicASCII,s),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=d}static isBasicASCII(e,t){return t?NI(e):!0}static containsRTL(e,t,i){return!t&&i?cg(e):!1}}class Cp{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class V5{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new Cp(new S(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class fF{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class pF{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}function H5(r){return Array.isArray(r)}function z5(r){return!H5(r)}function mF(r){return typeof r=="string"}function mN(r){return!mF(r)}function cu(r){return!r}function nc(r,e){return r.ignoreCase&&e?e.toLowerCase():e}function _N(r){return r.replace(/[&<>'"_]/g,"-")}function U5(r,e){console.log(`${r.languageId}: ${e}`)}function Ot(r,e){return new Error(`${r.languageId}: ${e}`)}function Vl(r,e,t,i,n){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let o=null;return e.replace(s,function(a,l,c,d,h,u,g,p,m){return cu(c)?cu(d)?!cu(h)&&h0;){const i=r.tokenizer[t];if(i)return i;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return null}function $5(r,e){let t=e;for(;t&&t.length>0;){if(r.stateNames[t])return!0;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return!1}var j5=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},K5=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const _F=5;class Qp{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new ju(e,t);let i=ju.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new ju(e,t),this._entries[i]=n,n)}}Qp._INSTANCE=new Qp(_F);class ju{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return ju._equals(this,e)}push(e){return Qp.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Qp.create(this.parent,e)}}class Su{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Su(this.languageId,this.state)}}class Hl{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new wp(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new wp(e,t);const i=ju.getStackElementId(e);let n=this._entries[i];return n||(n=new wp(e,null),this._entries[i]=n,n)}}Hl._INSTANCE=new Hl(_F);class wp{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Hl.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof wp)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class q5{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new qb(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const s=i.languageId,o=i.state,a=Gt.get(s);if(!a)return this.enterLanguage(s),this.emit(n,""),o;const l=a.tokenize(e,t,o);if(n!==0)for(const c of l.tokens)this._tokens.push(new qb(c.offset+n,c.type,c.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new TI(this._tokens,e)}}class tC{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=e!==null?e.length:0,s=t.length,o=i!==null?i.length:0;if(n===0&&s===0&&o===0)return new Uint32Array(0);if(n===0&&s===0)return i;if(s===0&&o===0)return e;const a=new Uint32Array(n+s+o);e!==null&&a.set(e);for(let l=0;l{if(o)return;let l=!1;for(let c=0,d=a.changedLanguages.length;c{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=Gt.get(t);if(i){if(i instanceof vF){const n=i.getLoadStatus();n.loaded===!1&&e.push(n.promise)}continue}Gt.isResolved(t)||e.push(Gt.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){const e=Qp.create(null,this._lexer.start);return Hl.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return eE(this._languageId,i);const n=new q5,s=this._tokenize(e,t,i,n);return n.finalize(s)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return Zw(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new tC(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n);return n.finalize(s)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=ov(this._lexer,t.stack.state),!i))throw Ot(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!mN(o.action)||o.action.nextEmbedded!=="@pop")continue;s=!0;let a=o.regex;const l=o.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){const d=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),d)}const c=e.search(a);c===-1||c!==0&&o.matchOnlyAtLineStart||(n===-1||c0&&s.nestedLanguageTokenize(a,!1,i.embeddedLanguageData,n);const l=e.substring(o);return this._myTokenize(l,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterLanguage(this._languageId);const o=e.length,a=t&&this._lexer.includeLF?e+` `:e,l=a.length;let c=i.embeddedLanguageData,d=i.stack,h=0,u=null,g=!0;for(;g||h=l)break;g=!1;let N=this._lexer.tokenizer[b];if(!N&&(N=ov(this._lexer,b),!N))throw Ot(this._lexer,"tokenizer state is not defined: "+b);const R=a.substr(h);for(const B of N)if((h===0||!B.matchOnlyAtLineStart)&&(v=R.match(B.regex),v)){C=v[0],w=B.action;break}}if(v||(v=[""],C=""),w||(h=this._lexer.maxStack)throw Ot(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(b)}else if(w.next==="@pop"){if(d.depth<=1)throw Ot(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(L));d=d.pop()}else if(w.next==="@popall")d=d.popall();else{let N=Vl(this._lexer,w.next,C,v,b);if(N[0]==="@"&&(N=N.substr(1)),ov(this._lexer,N))d=d.push(N);else throw Ot(this._lexer,"trying to set a next state '"+N+"' that is undefined in rule: "+this._safeRuleName(L))}}w.log&&typeof w.log=="string"&&U5(this._lexer,this._lexer.languageId+": "+Vl(this._lexer,w.log,C,v,b))}if(y===null)throw Ot(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(L));const D=N=>{const R=this._languageService.getLanguageIdByLanguageName(N)||this._languageService.getLanguageIdByMimeType(N)||N,B=this._getNestedEmbeddedLanguageData(R);if(h0)throw Ot(this._lexer,"groups cannot be nested: "+this._safeRuleName(L));if(v.length!==y.length+1)throw Ot(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(L));let N=0;for(let R=1;Rr});class rE{static colorizeElement(e,t,i,n){n=n||{};const s=n.theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(o)||o;e.setTheme(s);const l=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;const c=d=>{var h;const u=(h=Z0==null?void 0:Z0.createHTML(d))!==null&&h!==void 0?h:d;i.innerHTML=u};return this.colorize(t,l||"",a,n).then(c,d=>console.error(d))}static colorize(e,t,i,n){return Z5(this,void 0,void 0,function*(){const s=e.languageIdCodec;let o=4;n&&typeof n.tabSize=="number"&&(o=n.tabSize),MI(t)&&(t=t.substr(1));const a=ul(t);if(!e.isRegisteredLanguageId(i))return vN(a,o,s);const l=yield Gt.getOrCreate(i);return l?Y5(a,o,l,s):vN(a,o,s)})}static colorizeLine(e,t,i,n,s=4){const o=Fs.isBasicASCII(e,t),a=Fs.containsRTL(e,o,i);return Qw(new Fc(!1,!0,e,!1,o,a,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function Y5(r,e,t,i){return new Promise((n,s)=>{const o=()=>{const a=X5(r,e,t,i);if(t instanceof Jp){const l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(o,s);return}}n(a)};o()})}function vN(r,e,t){let i=[];const s=new Uint32Array(2);s[0]=0,s[1]=33587200;for(let o=0,a=r.length;o")}return i.join("")}function X5(r,e,t,i){let n=[],s=t.getInitialState();for(let o=0,a=r.length;o"),s=c.endState}return n.join("")}const aE={clipboard:{writeText:hr||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:hr||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>hr||ZI()?0:navigator.keyboard||gl?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};function hD(r,e){if(r===0)return null;const t=(r&65535)>>>0,i=(r&4294901760)>>>16;return i!==0?new bN([Y0(t,e),Y0(i,e)]):new bN([Y0(t,e)])}function Y0(r,e){const t=!!(r&2048),i=!!(r&256),n=e===2?i:t,s=!!(r&1024),o=!!(r&512),a=e===2?t:i,l=r&255;return new fl(n,s,o,a,l)}class fl{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return e instanceof fl&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class bN{constructor(e){if(e.length===0)throw As("chords");this.chords=e}}class Q5{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}}class J5{}function ej(r){if(r.charCode){const t=String.fromCharCode(r.charCode).toUpperCase();return mu.fromString(t)}const e=r.keyCode;if(e===3)return 7;if(no){if(e===59)return 80;if(e===107)return 81;if(e===109)return 83;if(Je&&e===224)return 57}else if(ic){if(e===91)return 57;if(Je&&e===93)return 57;if(!Je&&e===92)return 57}return Dz[e]||0}const tj=Je?256:2048,ij=512,nj=1024,sj=Je?2048:256;class Et{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=ej(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=tj),this.altKey&&(t|=ij),this.shiftKey&&(t|=nj),this.metaKey&&(t|=sj),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new fl(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let CN=!1,wf=null;function oj(r){if(!r.parent||r.parent===r)return null;try{const e=r.location,t=r.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return CN=!0,null}catch{return CN=!0,null}return r.parent}class rj{static getSameOriginWindowChain(){if(!wf){wf=[];let e=window,t;do t=oj(e),t?wf.push({window:e,iframeElement:e.frameElement||null}):wf.push({window:e,iframeElement:null}),e=t;while(e)}return wf.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const s=this.getSameOriginWindowChain();for(const o of s){if(i+=o.window.scrollY,n+=o.window.scrollX,o.window===t||!o.iframeElement)break;const a=o.iframeElement.getBoundingClientRect();i+=a.top,n+=a.left}return{top:i,left:n}}}class lr{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=e.button===0,this.middleButton=e.button===1,this.rightButton=e.button===2,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,e.type==="dblclick"&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,typeof e.pageX=="number"?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);const t=rj.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class qd{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){const n=e,s=e;if(typeof n.wheelDeltaY<"u")this.deltaY=n.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?no&&!Je?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof n.wheelDeltaX<"u")gl&&ts?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?no&&!Je?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)===null||e===void 0||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)===null||e===void 0||e.stopPropagation()}}/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function aj(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e1?t-1:0),n=1;n/gm),wj=pl(/^data-[\-\w.\u00B7-\uFFFF]/),Sj=pl(/^aria-[\-\w]+$/),yj=pl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Lj=pl(/^(?:\w+script|data):/i),Dj=pl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function xr(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e"u"?null:window},xj=function(e,t){if((typeof e>"u"?"undefined":$f(e))!=="object"||typeof e.createPolicy!="function")return null;var i=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(i=t.currentScript.getAttribute(n));var s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:function(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function CF(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kj(),e=function(q){return CF(q)};if(e.version="2.3.1",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,i=r.document,n=r.DocumentFragment,s=r.HTMLTemplateElement,o=r.Node,a=r.Element,l=r.NodeFilter,c=r.NamedNodeMap,d=c===void 0?r.NamedNodeMap||r.MozNamedAttrMap:c,h=r.Text,u=r.Comment,g=r.DOMParser,p=r.trustedTypes,m=a.prototype,_=rv(m,"cloneNode"),b=rv(m,"nextSibling"),v=rv(m,"childNodes"),C=rv(m,"parentNode");if(typeof s=="function"){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var L=xj(p,t),T=L&&Uh?L.createHTML(""):"",y=i,D=y.implementation,N=y.createNodeIterator,R=y.createDocumentFragment,B=y.getElementsByTagName,U=t.importNode,H={};try{H=Xc(i).documentMode?i.documentMode:{}}catch{}var ie={};e.isSupported=typeof C=="function"&&D&&typeof D.createHTMLDocument<"u"&&H!==9;var he=bj,_e=Cj,Me=wj,We=Sj,xe=Lj,qe=Dj,Ye=yj,fe=null,Ce=St({},[].concat(xr(DN),xr(X0),xr(Q0),xr(J0),xr(kN))),lt=null,Mi=St({},[].concat(xr(xN),xr(ey),xr(IN),xr(av))),wi=null,Nn=null,Ie=!0,de=!0,we=!1,ae=!1,pi=!1,mi=!1,hn=!1,zn=!1,Uo=!1,La=!0,Uh=!1,K_=!0,G=!0,$=!1,z={},k=null,M=St({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),F=null,O=St({},["audio","video","img","source","image","track"]),Z=null,re=St({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Se="http://www.w3.org/1998/Math/MathML",ke="http://www.w3.org/2000/svg",$e="http://www.w3.org/1999/xhtml",He=$e,Tt=!1,bt=null,Oe=i.createElement("form"),Li=function(q){bt&&bt===q||((!q||(typeof q>"u"?"undefined":$f(q))!=="object")&&(q={}),q=Xc(q),fe="ALLOWED_TAGS"in q?St({},q.ALLOWED_TAGS):Ce,lt="ALLOWED_ATTR"in q?St({},q.ALLOWED_ATTR):Mi,Z="ADD_URI_SAFE_ATTR"in q?St(Xc(re),q.ADD_URI_SAFE_ATTR):re,F="ADD_DATA_URI_TAGS"in q?St(Xc(O),q.ADD_DATA_URI_TAGS):O,k="FORBID_CONTENTS"in q?St({},q.FORBID_CONTENTS):M,wi="FORBID_TAGS"in q?St({},q.FORBID_TAGS):{},Nn="FORBID_ATTR"in q?St({},q.FORBID_ATTR):{},z="USE_PROFILES"in q?q.USE_PROFILES:!1,Ie=q.ALLOW_ARIA_ATTR!==!1,de=q.ALLOW_DATA_ATTR!==!1,we=q.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=q.SAFE_FOR_TEMPLATES||!1,pi=q.WHOLE_DOCUMENT||!1,zn=q.RETURN_DOM||!1,Uo=q.RETURN_DOM_FRAGMENT||!1,La=q.RETURN_DOM_IMPORT!==!1,Uh=q.RETURN_TRUSTED_TYPE||!1,hn=q.FORCE_BODY||!1,K_=q.SANITIZE_DOM!==!1,G=q.KEEP_CONTENT!==!1,$=q.IN_PLACE||!1,Ye=q.ALLOWED_URI_REGEXP||Ye,He=q.NAMESPACE||$e,ae&&(de=!1),Uo&&(zn=!0),z&&(fe=St({},[].concat(xr(kN))),lt=[],z.html===!0&&(St(fe,DN),St(lt,xN)),z.svg===!0&&(St(fe,X0),St(lt,ey),St(lt,av)),z.svgFilters===!0&&(St(fe,Q0),St(lt,ey),St(lt,av)),z.mathMl===!0&&(St(fe,J0),St(lt,IN),St(lt,av))),q.ADD_TAGS&&(fe===Ce&&(fe=Xc(fe)),St(fe,q.ADD_TAGS)),q.ADD_ATTR&&(lt===Mi&&(lt=Xc(lt)),St(lt,q.ADD_ATTR)),q.ADD_URI_SAFE_ATTR&&St(Z,q.ADD_URI_SAFE_ATTR),q.FORBID_CONTENTS&&(k===M&&(k=Xc(k)),St(k,q.FORBID_CONTENTS)),G&&(fe["#text"]=!0),pi&&St(fe,["html","head","body"]),fe.table&&(St(fe,["tbody"]),delete wi.tbody),vs&&vs(q),bt=q)},Yt=St({},["mi","mo","mn","ms","mtext"]),zs=St({},["foreignobject","desc","title","annotation-xml"]),ni=St({},X0);St(ni,Q0),St(ni,_j);var $i=St({},J0);St($i,vj);var qc=function(q){var ye=C(q);(!ye||!ye.tagName)&&(ye={namespaceURI:$e,tagName:"template"});var je=od(q.tagName),si=od(ye.tagName);if(q.namespaceURI===ke)return ye.namespaceURI===$e?je==="svg":ye.namespaceURI===Se?je==="svg"&&(si==="annotation-xml"||Yt[si]):!!ni[je];if(q.namespaceURI===Se)return ye.namespaceURI===$e?je==="math":ye.namespaceURI===ke?je==="math"&&zs[si]:!!$i[je];if(q.namespaceURI===$e){if(ye.namespaceURI===ke&&!zs[si]||ye.namespaceURI===Se&&!Yt[si])return!1;var Un=St({},["title","style","font","a","script"]);return!$i[je]&&(Un[je]||!ni[je])}return!1},Cs=function(q){Sf(e.removed,{element:q});try{q.parentNode.removeChild(q)}catch{try{q.outerHTML=T}catch{q.remove()}}},kr=function(q,ye){try{Sf(e.removed,{attribute:ye.getAttributeNode(q),from:ye})}catch{Sf(e.removed,{attribute:null,from:ye})}if(ye.removeAttribute(q),q==="is"&&!lt[q])if(zn||Uo)try{Cs(ye)}catch{}else try{ye.setAttribute(q,"")}catch{}},kl=function(q){var ye=void 0,je=void 0;if(hn)q=""+q;else{var si=yN(q,/^[\r\n\t ]+/);je=si&&si[0]}var Un=L?L.createHTML(q):q;if(He===$e)try{ye=new g().parseFromString(Un,"text/html")}catch{}if(!ye||!ye.documentElement){ye=D.createDocument(He,"template",null);try{ye.documentElement.innerHTML=Tt?"":Un}catch{}}var $n=ye.body||ye.documentElement;return q&&je&&$n.insertBefore(i.createTextNode(je),$n.childNodes[0]||null),He===$e?B.call(ye,pi?"html":"body")[0]:pi?ye.documentElement:$n},Gc=function(q){return N.call(q.ownerDocument||q,q,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Zc=function(q){return q instanceof h||q instanceof u?!1:typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||!(q.attributes instanceof d)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"},Yc=function(q){return(typeof o>"u"?"undefined":$f(o))==="object"?q instanceof o:q&&(typeof q>"u"?"undefined":$f(q))==="object"&&typeof q.nodeType=="number"&&typeof q.nodeName=="string"},Us=function(q,ye,je){ie[q]&&gj(ie[q],function(si){si.call(e,ye,je,bt)})},q_=function(q){var ye=void 0;if(Us("beforeSanitizeElements",q,null),Zc(q)||yN(q.nodeName,/[\u0080-\uFFFF]/))return Cs(q),!0;var je=od(q.nodeName);if(Us("uponSanitizeElement",q,{tagName:je,allowedTags:fe}),!Yc(q.firstElementChild)&&(!Yc(q.content)||!Yc(q.content.firstElementChild))&&xa(/<[/\w]/g,q.innerHTML)&&xa(/<[/\w]/g,q.textContent)||je==="select"&&xa(/